@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/iAMUsersApi.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,12 +118,12 @@ export class IAMUsersApi {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* Adds a list of access permissions to a user. When called, this endpoint may generate one or more of the following [
|
|
121
|
+
* Adds a list of access permissions to a user. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Policy Created * User Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
122
122
|
* @summary Add Permissions to User
|
|
123
123
|
* @param userId
|
|
124
124
|
* @param AddPermissionsToUserV1Input
|
|
125
125
|
*/
|
|
126
|
-
public async
|
|
126
|
+
public async addPermissionsToUser(
|
|
127
127
|
userId: string,
|
|
128
128
|
AddPermissionsToUserV1Input: AddPermissionsToUserV1Input,
|
|
129
129
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
@@ -143,152 +143,23 @@ export class IAMUsersApi {
|
|
|
143
143
|
this._defaultHeaders
|
|
144
144
|
);
|
|
145
145
|
const produces = [
|
|
146
|
-
'application/vnd.segment.
|
|
146
|
+
'application/vnd.segment.v1+json',
|
|
147
147
|
'application/json',
|
|
148
|
-
];
|
|
149
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
150
|
-
localVarHeaderParams.Accept = produces[0];
|
|
151
|
-
} else {
|
|
152
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
153
|
-
}
|
|
154
|
-
let localVarFormParams: any = {};
|
|
155
|
-
|
|
156
|
-
// verify required parameter 'userId' is not null or undefined
|
|
157
|
-
if (userId === null || userId === undefined) {
|
|
158
|
-
throw new Error(
|
|
159
|
-
'Required parameter userId was null or undefined when calling addPermissionsToUserAlpha.'
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// verify required parameter 'AddPermissionsToUserV1Input' is not null or undefined
|
|
164
|
-
if (
|
|
165
|
-
AddPermissionsToUserV1Input === null ||
|
|
166
|
-
AddPermissionsToUserV1Input === undefined
|
|
167
|
-
) {
|
|
168
|
-
throw new Error(
|
|
169
|
-
'Required parameter AddPermissionsToUserV1Input was null or undefined when calling addPermissionsToUserAlpha.'
|
|
170
|
-
);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
174
|
-
|
|
175
|
-
let localVarUseFormData = false;
|
|
176
|
-
|
|
177
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
178
|
-
method: 'POST',
|
|
179
|
-
qs: localVarQueryParameters,
|
|
180
|
-
headers: localVarHeaderParams,
|
|
181
|
-
uri: localVarPath,
|
|
182
|
-
useQuerystring: this._useQuerystring,
|
|
183
|
-
json: true,
|
|
184
|
-
body: ObjectSerializer.serialize(
|
|
185
|
-
AddPermissionsToUserV1Input,
|
|
186
|
-
'AddPermissionsToUserV1Input'
|
|
187
|
-
),
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
let authenticationPromise = Promise.resolve();
|
|
191
|
-
if (this.authentications.token.accessToken) {
|
|
192
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
193
|
-
this.authentications.token.applyToRequest(
|
|
194
|
-
localVarRequestOptions
|
|
195
|
-
)
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
199
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
200
|
-
);
|
|
201
|
-
|
|
202
|
-
let interceptorPromise = authenticationPromise;
|
|
203
|
-
for (const interceptor of this.interceptors) {
|
|
204
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
205
|
-
interceptor(localVarRequestOptions)
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return interceptorPromise.then(() => {
|
|
210
|
-
if (Object.keys(localVarFormParams).length) {
|
|
211
|
-
if (localVarUseFormData) {
|
|
212
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
213
|
-
} else {
|
|
214
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
return new Promise<{
|
|
218
|
-
response: http.IncomingMessage;
|
|
219
|
-
body: AddPermissionsToUser200Response;
|
|
220
|
-
}>((resolve, reject) => {
|
|
221
|
-
localVarRequest(
|
|
222
|
-
localVarRequestOptions,
|
|
223
|
-
(error, response, body) => {
|
|
224
|
-
if (error) {
|
|
225
|
-
reject(error);
|
|
226
|
-
} else {
|
|
227
|
-
if (
|
|
228
|
-
response.statusCode &&
|
|
229
|
-
response.statusCode >= 200 &&
|
|
230
|
-
response.statusCode <= 299
|
|
231
|
-
) {
|
|
232
|
-
body = ObjectSerializer.deserialize(
|
|
233
|
-
body,
|
|
234
|
-
'AddPermissionsToUser200Response'
|
|
235
|
-
);
|
|
236
|
-
resolve({ response: response, body: body });
|
|
237
|
-
} else {
|
|
238
|
-
reject(
|
|
239
|
-
new HttpError(
|
|
240
|
-
response,
|
|
241
|
-
body,
|
|
242
|
-
response.statusCode
|
|
243
|
-
)
|
|
244
|
-
);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
});
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Adds a list of access permissions to a user. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Policy Created * User Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
254
|
-
* @summary Add Permissions to User
|
|
255
|
-
* @param userId
|
|
256
|
-
* @param AddPermissionsToUserV1Input
|
|
257
|
-
*/
|
|
258
|
-
public async addPermissionsToUserBeta(
|
|
259
|
-
userId: string,
|
|
260
|
-
AddPermissionsToUserV1Input: AddPermissionsToUserV1Input,
|
|
261
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
262
|
-
): Promise<{
|
|
263
|
-
response: http.IncomingMessage;
|
|
264
|
-
body: AddPermissionsToUser200Response;
|
|
265
|
-
}> {
|
|
266
|
-
const localVarPath =
|
|
267
|
-
this.basePath +
|
|
268
|
-
'/users/{userId}/permissions'.replace(
|
|
269
|
-
'{' + 'userId' + '}',
|
|
270
|
-
encodeURIComponent(String(userId))
|
|
271
|
-
);
|
|
272
|
-
let localVarQueryParameters: any = {};
|
|
273
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
274
|
-
{},
|
|
275
|
-
this._defaultHeaders
|
|
276
|
-
);
|
|
277
|
-
const produces = [
|
|
278
148
|
'application/vnd.segment.v1beta+json',
|
|
279
|
-
'application/json',
|
|
149
|
+
'application/vnd.segment.v1alpha+json',
|
|
280
150
|
];
|
|
151
|
+
// give precedence to 'application/json'
|
|
281
152
|
if (produces.indexOf('application/json') >= 0) {
|
|
282
|
-
localVarHeaderParams.Accept = produces[0];
|
|
283
|
-
} else {
|
|
284
153
|
localVarHeaderParams.Accept = 'application/json';
|
|
154
|
+
} else {
|
|
155
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
285
156
|
}
|
|
286
157
|
let localVarFormParams: any = {};
|
|
287
158
|
|
|
288
159
|
// verify required parameter 'userId' is not null or undefined
|
|
289
160
|
if (userId === null || userId === undefined) {
|
|
290
161
|
throw new Error(
|
|
291
|
-
'Required parameter userId was null or undefined when calling
|
|
162
|
+
'Required parameter userId was null or undefined when calling addPermissionsToUser.'
|
|
292
163
|
);
|
|
293
164
|
}
|
|
294
165
|
|
|
@@ -298,7 +169,7 @@ export class IAMUsersApi {
|
|
|
298
169
|
AddPermissionsToUserV1Input === undefined
|
|
299
170
|
) {
|
|
300
171
|
throw new Error(
|
|
301
|
-
'Required parameter AddPermissionsToUserV1Input was null or undefined when calling
|
|
172
|
+
'Required parameter AddPermissionsToUserV1Input was null or undefined when calling addPermissionsToUser.'
|
|
302
173
|
);
|
|
303
174
|
}
|
|
304
175
|
|
|
@@ -382,25 +253,18 @@ export class IAMUsersApi {
|
|
|
382
253
|
});
|
|
383
254
|
}
|
|
384
255
|
/**
|
|
385
|
-
*
|
|
386
|
-
* @summary
|
|
387
|
-
* @param
|
|
388
|
-
* @param AddPermissionsToUserV1Input
|
|
256
|
+
* Invites a list of users to join a Workspace. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
257
|
+
* @summary Create Invites
|
|
258
|
+
* @param CreateInvitesV1Input
|
|
389
259
|
*/
|
|
390
|
-
public async
|
|
391
|
-
|
|
392
|
-
AddPermissionsToUserV1Input: AddPermissionsToUserV1Input,
|
|
260
|
+
public async createInvites(
|
|
261
|
+
CreateInvitesV1Input: CreateInvitesV1Input,
|
|
393
262
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
394
263
|
): Promise<{
|
|
395
264
|
response: http.IncomingMessage;
|
|
396
|
-
body:
|
|
265
|
+
body: CreateInvites200Response;
|
|
397
266
|
}> {
|
|
398
|
-
const localVarPath =
|
|
399
|
-
this.basePath +
|
|
400
|
-
'/users/{userId}/permissions'.replace(
|
|
401
|
-
'{' + 'userId' + '}',
|
|
402
|
-
encodeURIComponent(String(userId))
|
|
403
|
-
);
|
|
267
|
+
const localVarPath = this.basePath + '/invites';
|
|
404
268
|
let localVarQueryParameters: any = {};
|
|
405
269
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
406
270
|
{},
|
|
@@ -409,3132 +273,24 @@ export class IAMUsersApi {
|
|
|
409
273
|
const produces = [
|
|
410
274
|
'application/vnd.segment.v1+json',
|
|
411
275
|
'application/json',
|
|
276
|
+
'application/vnd.segment.v1beta+json',
|
|
277
|
+
'application/vnd.segment.v1alpha+json',
|
|
412
278
|
];
|
|
279
|
+
// give precedence to 'application/json'
|
|
413
280
|
if (produces.indexOf('application/json') >= 0) {
|
|
414
|
-
localVarHeaderParams.Accept = produces[0];
|
|
415
|
-
} else {
|
|
416
281
|
localVarHeaderParams.Accept = 'application/json';
|
|
282
|
+
} else {
|
|
283
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
417
284
|
}
|
|
418
285
|
let localVarFormParams: any = {};
|
|
419
286
|
|
|
420
|
-
// verify required parameter '
|
|
421
|
-
if (userId === null || userId === undefined) {
|
|
422
|
-
throw new Error(
|
|
423
|
-
'Required parameter userId was null or undefined when calling addPermissionsToUserCurrent.'
|
|
424
|
-
);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
// verify required parameter 'AddPermissionsToUserV1Input' is not null or undefined
|
|
287
|
+
// verify required parameter 'CreateInvitesV1Input' is not null or undefined
|
|
428
288
|
if (
|
|
429
|
-
|
|
430
|
-
|
|
289
|
+
CreateInvitesV1Input === null ||
|
|
290
|
+
CreateInvitesV1Input === undefined
|
|
431
291
|
) {
|
|
432
292
|
throw new Error(
|
|
433
|
-
'Required parameter
|
|
434
|
-
);
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
438
|
-
|
|
439
|
-
let localVarUseFormData = false;
|
|
440
|
-
|
|
441
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
442
|
-
method: 'POST',
|
|
443
|
-
qs: localVarQueryParameters,
|
|
444
|
-
headers: localVarHeaderParams,
|
|
445
|
-
uri: localVarPath,
|
|
446
|
-
useQuerystring: this._useQuerystring,
|
|
447
|
-
json: true,
|
|
448
|
-
body: ObjectSerializer.serialize(
|
|
449
|
-
AddPermissionsToUserV1Input,
|
|
450
|
-
'AddPermissionsToUserV1Input'
|
|
451
|
-
),
|
|
452
|
-
};
|
|
453
|
-
|
|
454
|
-
let authenticationPromise = Promise.resolve();
|
|
455
|
-
if (this.authentications.token.accessToken) {
|
|
456
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
457
|
-
this.authentications.token.applyToRequest(
|
|
458
|
-
localVarRequestOptions
|
|
459
|
-
)
|
|
460
|
-
);
|
|
461
|
-
}
|
|
462
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
463
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
464
|
-
);
|
|
465
|
-
|
|
466
|
-
let interceptorPromise = authenticationPromise;
|
|
467
|
-
for (const interceptor of this.interceptors) {
|
|
468
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
469
|
-
interceptor(localVarRequestOptions)
|
|
470
|
-
);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
return interceptorPromise.then(() => {
|
|
474
|
-
if (Object.keys(localVarFormParams).length) {
|
|
475
|
-
if (localVarUseFormData) {
|
|
476
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
477
|
-
} else {
|
|
478
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
return new Promise<{
|
|
482
|
-
response: http.IncomingMessage;
|
|
483
|
-
body: AddPermissionsToUser200Response;
|
|
484
|
-
}>((resolve, reject) => {
|
|
485
|
-
localVarRequest(
|
|
486
|
-
localVarRequestOptions,
|
|
487
|
-
(error, response, body) => {
|
|
488
|
-
if (error) {
|
|
489
|
-
reject(error);
|
|
490
|
-
} else {
|
|
491
|
-
if (
|
|
492
|
-
response.statusCode &&
|
|
493
|
-
response.statusCode >= 200 &&
|
|
494
|
-
response.statusCode <= 299
|
|
495
|
-
) {
|
|
496
|
-
body = ObjectSerializer.deserialize(
|
|
497
|
-
body,
|
|
498
|
-
'AddPermissionsToUser200Response'
|
|
499
|
-
);
|
|
500
|
-
resolve({ response: response, body: body });
|
|
501
|
-
} else {
|
|
502
|
-
reject(
|
|
503
|
-
new HttpError(
|
|
504
|
-
response,
|
|
505
|
-
body,
|
|
506
|
-
response.statusCode
|
|
507
|
-
)
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
);
|
|
513
|
-
});
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* Adds a list of access permissions to a user. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Policy Created * User Policy Updated The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
518
|
-
* @summary Add Permissions to User
|
|
519
|
-
* @param userId
|
|
520
|
-
* @param AddPermissionsToUserV1Input
|
|
521
|
-
*/
|
|
522
|
-
public async addPermissionsToUserV1(
|
|
523
|
-
userId: string,
|
|
524
|
-
AddPermissionsToUserV1Input: AddPermissionsToUserV1Input,
|
|
525
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
526
|
-
): Promise<{
|
|
527
|
-
response: http.IncomingMessage;
|
|
528
|
-
body: AddPermissionsToUser200Response;
|
|
529
|
-
}> {
|
|
530
|
-
const localVarPath =
|
|
531
|
-
this.basePath +
|
|
532
|
-
'/users/{userId}/permissions'.replace(
|
|
533
|
-
'{' + 'userId' + '}',
|
|
534
|
-
encodeURIComponent(String(userId))
|
|
535
|
-
);
|
|
536
|
-
let localVarQueryParameters: any = {};
|
|
537
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
538
|
-
{},
|
|
539
|
-
this._defaultHeaders
|
|
540
|
-
);
|
|
541
|
-
const produces = [
|
|
542
|
-
'application/vnd.segment.v1+json',
|
|
543
|
-
'application/json',
|
|
544
|
-
];
|
|
545
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
546
|
-
localVarHeaderParams.Accept = produces[0];
|
|
547
|
-
} else {
|
|
548
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
549
|
-
}
|
|
550
|
-
let localVarFormParams: any = {};
|
|
551
|
-
|
|
552
|
-
// verify required parameter 'userId' is not null or undefined
|
|
553
|
-
if (userId === null || userId === undefined) {
|
|
554
|
-
throw new Error(
|
|
555
|
-
'Required parameter userId was null or undefined when calling addPermissionsToUserV1.'
|
|
556
|
-
);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
// verify required parameter 'AddPermissionsToUserV1Input' is not null or undefined
|
|
560
|
-
if (
|
|
561
|
-
AddPermissionsToUserV1Input === null ||
|
|
562
|
-
AddPermissionsToUserV1Input === undefined
|
|
563
|
-
) {
|
|
564
|
-
throw new Error(
|
|
565
|
-
'Required parameter AddPermissionsToUserV1Input was null or undefined when calling addPermissionsToUserV1.'
|
|
566
|
-
);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
570
|
-
|
|
571
|
-
let localVarUseFormData = false;
|
|
572
|
-
|
|
573
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
574
|
-
method: 'POST',
|
|
575
|
-
qs: localVarQueryParameters,
|
|
576
|
-
headers: localVarHeaderParams,
|
|
577
|
-
uri: localVarPath,
|
|
578
|
-
useQuerystring: this._useQuerystring,
|
|
579
|
-
json: true,
|
|
580
|
-
body: ObjectSerializer.serialize(
|
|
581
|
-
AddPermissionsToUserV1Input,
|
|
582
|
-
'AddPermissionsToUserV1Input'
|
|
583
|
-
),
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
let authenticationPromise = Promise.resolve();
|
|
587
|
-
if (this.authentications.token.accessToken) {
|
|
588
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
589
|
-
this.authentications.token.applyToRequest(
|
|
590
|
-
localVarRequestOptions
|
|
591
|
-
)
|
|
592
|
-
);
|
|
593
|
-
}
|
|
594
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
595
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
596
|
-
);
|
|
597
|
-
|
|
598
|
-
let interceptorPromise = authenticationPromise;
|
|
599
|
-
for (const interceptor of this.interceptors) {
|
|
600
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
601
|
-
interceptor(localVarRequestOptions)
|
|
602
|
-
);
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
return interceptorPromise.then(() => {
|
|
606
|
-
if (Object.keys(localVarFormParams).length) {
|
|
607
|
-
if (localVarUseFormData) {
|
|
608
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
609
|
-
} else {
|
|
610
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return new Promise<{
|
|
614
|
-
response: http.IncomingMessage;
|
|
615
|
-
body: AddPermissionsToUser200Response;
|
|
616
|
-
}>((resolve, reject) => {
|
|
617
|
-
localVarRequest(
|
|
618
|
-
localVarRequestOptions,
|
|
619
|
-
(error, response, body) => {
|
|
620
|
-
if (error) {
|
|
621
|
-
reject(error);
|
|
622
|
-
} else {
|
|
623
|
-
if (
|
|
624
|
-
response.statusCode &&
|
|
625
|
-
response.statusCode >= 200 &&
|
|
626
|
-
response.statusCode <= 299
|
|
627
|
-
) {
|
|
628
|
-
body = ObjectSerializer.deserialize(
|
|
629
|
-
body,
|
|
630
|
-
'AddPermissionsToUser200Response'
|
|
631
|
-
);
|
|
632
|
-
resolve({ response: response, body: body });
|
|
633
|
-
} else {
|
|
634
|
-
reject(
|
|
635
|
-
new HttpError(
|
|
636
|
-
response,
|
|
637
|
-
body,
|
|
638
|
-
response.statusCode
|
|
639
|
-
)
|
|
640
|
-
);
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
);
|
|
645
|
-
});
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
/**
|
|
649
|
-
* Invites a list of users to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
650
|
-
* @summary Create Invites
|
|
651
|
-
* @param CreateInvitesV1Input
|
|
652
|
-
*/
|
|
653
|
-
public async createInvitesAlpha(
|
|
654
|
-
CreateInvitesV1Input: CreateInvitesV1Input,
|
|
655
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
656
|
-
): Promise<{
|
|
657
|
-
response: http.IncomingMessage;
|
|
658
|
-
body: CreateInvites200Response;
|
|
659
|
-
}> {
|
|
660
|
-
const localVarPath = this.basePath + '/invites';
|
|
661
|
-
let localVarQueryParameters: any = {};
|
|
662
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
663
|
-
{},
|
|
664
|
-
this._defaultHeaders
|
|
665
|
-
);
|
|
666
|
-
const produces = [
|
|
667
|
-
'application/vnd.segment.v1alpha+json',
|
|
668
|
-
'application/json',
|
|
669
|
-
];
|
|
670
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
671
|
-
localVarHeaderParams.Accept = produces[0];
|
|
672
|
-
} else {
|
|
673
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
674
|
-
}
|
|
675
|
-
let localVarFormParams: any = {};
|
|
676
|
-
|
|
677
|
-
// verify required parameter 'CreateInvitesV1Input' is not null or undefined
|
|
678
|
-
if (
|
|
679
|
-
CreateInvitesV1Input === null ||
|
|
680
|
-
CreateInvitesV1Input === undefined
|
|
681
|
-
) {
|
|
682
|
-
throw new Error(
|
|
683
|
-
'Required parameter CreateInvitesV1Input was null or undefined when calling createInvitesAlpha.'
|
|
684
|
-
);
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
688
|
-
|
|
689
|
-
let localVarUseFormData = false;
|
|
690
|
-
|
|
691
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
692
|
-
method: 'POST',
|
|
693
|
-
qs: localVarQueryParameters,
|
|
694
|
-
headers: localVarHeaderParams,
|
|
695
|
-
uri: localVarPath,
|
|
696
|
-
useQuerystring: this._useQuerystring,
|
|
697
|
-
json: true,
|
|
698
|
-
body: ObjectSerializer.serialize(
|
|
699
|
-
CreateInvitesV1Input,
|
|
700
|
-
'CreateInvitesV1Input'
|
|
701
|
-
),
|
|
702
|
-
};
|
|
703
|
-
|
|
704
|
-
let authenticationPromise = Promise.resolve();
|
|
705
|
-
if (this.authentications.token.accessToken) {
|
|
706
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
707
|
-
this.authentications.token.applyToRequest(
|
|
708
|
-
localVarRequestOptions
|
|
709
|
-
)
|
|
710
|
-
);
|
|
711
|
-
}
|
|
712
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
713
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
714
|
-
);
|
|
715
|
-
|
|
716
|
-
let interceptorPromise = authenticationPromise;
|
|
717
|
-
for (const interceptor of this.interceptors) {
|
|
718
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
719
|
-
interceptor(localVarRequestOptions)
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
return interceptorPromise.then(() => {
|
|
724
|
-
if (Object.keys(localVarFormParams).length) {
|
|
725
|
-
if (localVarUseFormData) {
|
|
726
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
727
|
-
} else {
|
|
728
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
return new Promise<{
|
|
732
|
-
response: http.IncomingMessage;
|
|
733
|
-
body: CreateInvites200Response;
|
|
734
|
-
}>((resolve, reject) => {
|
|
735
|
-
localVarRequest(
|
|
736
|
-
localVarRequestOptions,
|
|
737
|
-
(error, response, body) => {
|
|
738
|
-
if (error) {
|
|
739
|
-
reject(error);
|
|
740
|
-
} else {
|
|
741
|
-
if (
|
|
742
|
-
response.statusCode &&
|
|
743
|
-
response.statusCode >= 200 &&
|
|
744
|
-
response.statusCode <= 299
|
|
745
|
-
) {
|
|
746
|
-
body = ObjectSerializer.deserialize(
|
|
747
|
-
body,
|
|
748
|
-
'CreateInvites200Response'
|
|
749
|
-
);
|
|
750
|
-
resolve({ response: response, body: body });
|
|
751
|
-
} else {
|
|
752
|
-
reject(
|
|
753
|
-
new HttpError(
|
|
754
|
-
response,
|
|
755
|
-
body,
|
|
756
|
-
response.statusCode
|
|
757
|
-
)
|
|
758
|
-
);
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
);
|
|
763
|
-
});
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Invites a list of users to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
768
|
-
* @summary Create Invites
|
|
769
|
-
* @param CreateInvitesV1Input
|
|
770
|
-
*/
|
|
771
|
-
public async createInvitesBeta(
|
|
772
|
-
CreateInvitesV1Input: CreateInvitesV1Input,
|
|
773
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
774
|
-
): Promise<{
|
|
775
|
-
response: http.IncomingMessage;
|
|
776
|
-
body: CreateInvites200Response;
|
|
777
|
-
}> {
|
|
778
|
-
const localVarPath = this.basePath + '/invites';
|
|
779
|
-
let localVarQueryParameters: any = {};
|
|
780
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
781
|
-
{},
|
|
782
|
-
this._defaultHeaders
|
|
783
|
-
);
|
|
784
|
-
const produces = [
|
|
785
|
-
'application/vnd.segment.v1beta+json',
|
|
786
|
-
'application/json',
|
|
787
|
-
];
|
|
788
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
789
|
-
localVarHeaderParams.Accept = produces[0];
|
|
790
|
-
} else {
|
|
791
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
792
|
-
}
|
|
793
|
-
let localVarFormParams: any = {};
|
|
794
|
-
|
|
795
|
-
// verify required parameter 'CreateInvitesV1Input' is not null or undefined
|
|
796
|
-
if (
|
|
797
|
-
CreateInvitesV1Input === null ||
|
|
798
|
-
CreateInvitesV1Input === undefined
|
|
799
|
-
) {
|
|
800
|
-
throw new Error(
|
|
801
|
-
'Required parameter CreateInvitesV1Input was null or undefined when calling createInvitesBeta.'
|
|
802
|
-
);
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
806
|
-
|
|
807
|
-
let localVarUseFormData = false;
|
|
808
|
-
|
|
809
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
810
|
-
method: 'POST',
|
|
811
|
-
qs: localVarQueryParameters,
|
|
812
|
-
headers: localVarHeaderParams,
|
|
813
|
-
uri: localVarPath,
|
|
814
|
-
useQuerystring: this._useQuerystring,
|
|
815
|
-
json: true,
|
|
816
|
-
body: ObjectSerializer.serialize(
|
|
817
|
-
CreateInvitesV1Input,
|
|
818
|
-
'CreateInvitesV1Input'
|
|
819
|
-
),
|
|
820
|
-
};
|
|
821
|
-
|
|
822
|
-
let authenticationPromise = Promise.resolve();
|
|
823
|
-
if (this.authentications.token.accessToken) {
|
|
824
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
825
|
-
this.authentications.token.applyToRequest(
|
|
826
|
-
localVarRequestOptions
|
|
827
|
-
)
|
|
828
|
-
);
|
|
829
|
-
}
|
|
830
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
831
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
832
|
-
);
|
|
833
|
-
|
|
834
|
-
let interceptorPromise = authenticationPromise;
|
|
835
|
-
for (const interceptor of this.interceptors) {
|
|
836
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
837
|
-
interceptor(localVarRequestOptions)
|
|
838
|
-
);
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
return interceptorPromise.then(() => {
|
|
842
|
-
if (Object.keys(localVarFormParams).length) {
|
|
843
|
-
if (localVarUseFormData) {
|
|
844
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
845
|
-
} else {
|
|
846
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
return new Promise<{
|
|
850
|
-
response: http.IncomingMessage;
|
|
851
|
-
body: CreateInvites200Response;
|
|
852
|
-
}>((resolve, reject) => {
|
|
853
|
-
localVarRequest(
|
|
854
|
-
localVarRequestOptions,
|
|
855
|
-
(error, response, body) => {
|
|
856
|
-
if (error) {
|
|
857
|
-
reject(error);
|
|
858
|
-
} else {
|
|
859
|
-
if (
|
|
860
|
-
response.statusCode &&
|
|
861
|
-
response.statusCode >= 200 &&
|
|
862
|
-
response.statusCode <= 299
|
|
863
|
-
) {
|
|
864
|
-
body = ObjectSerializer.deserialize(
|
|
865
|
-
body,
|
|
866
|
-
'CreateInvites200Response'
|
|
867
|
-
);
|
|
868
|
-
resolve({ response: response, body: body });
|
|
869
|
-
} else {
|
|
870
|
-
reject(
|
|
871
|
-
new HttpError(
|
|
872
|
-
response,
|
|
873
|
-
body,
|
|
874
|
-
response.statusCode
|
|
875
|
-
)
|
|
876
|
-
);
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
);
|
|
881
|
-
});
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* Invites a list of users to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
886
|
-
* @summary Create Invites
|
|
887
|
-
* @param CreateInvitesV1Input
|
|
888
|
-
*/
|
|
889
|
-
public async createInvitesCurrent(
|
|
890
|
-
CreateInvitesV1Input: CreateInvitesV1Input,
|
|
891
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
892
|
-
): Promise<{
|
|
893
|
-
response: http.IncomingMessage;
|
|
894
|
-
body: CreateInvites200Response;
|
|
895
|
-
}> {
|
|
896
|
-
const localVarPath = this.basePath + '/invites';
|
|
897
|
-
let localVarQueryParameters: any = {};
|
|
898
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
899
|
-
{},
|
|
900
|
-
this._defaultHeaders
|
|
901
|
-
);
|
|
902
|
-
const produces = [
|
|
903
|
-
'application/vnd.segment.v1+json',
|
|
904
|
-
'application/json',
|
|
905
|
-
];
|
|
906
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
907
|
-
localVarHeaderParams.Accept = produces[0];
|
|
908
|
-
} else {
|
|
909
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
910
|
-
}
|
|
911
|
-
let localVarFormParams: any = {};
|
|
912
|
-
|
|
913
|
-
// verify required parameter 'CreateInvitesV1Input' is not null or undefined
|
|
914
|
-
if (
|
|
915
|
-
CreateInvitesV1Input === null ||
|
|
916
|
-
CreateInvitesV1Input === undefined
|
|
917
|
-
) {
|
|
918
|
-
throw new Error(
|
|
919
|
-
'Required parameter CreateInvitesV1Input was null or undefined when calling createInvitesCurrent.'
|
|
920
|
-
);
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
924
|
-
|
|
925
|
-
let localVarUseFormData = false;
|
|
926
|
-
|
|
927
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
928
|
-
method: 'POST',
|
|
929
|
-
qs: localVarQueryParameters,
|
|
930
|
-
headers: localVarHeaderParams,
|
|
931
|
-
uri: localVarPath,
|
|
932
|
-
useQuerystring: this._useQuerystring,
|
|
933
|
-
json: true,
|
|
934
|
-
body: ObjectSerializer.serialize(
|
|
935
|
-
CreateInvitesV1Input,
|
|
936
|
-
'CreateInvitesV1Input'
|
|
937
|
-
),
|
|
938
|
-
};
|
|
939
|
-
|
|
940
|
-
let authenticationPromise = Promise.resolve();
|
|
941
|
-
if (this.authentications.token.accessToken) {
|
|
942
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
943
|
-
this.authentications.token.applyToRequest(
|
|
944
|
-
localVarRequestOptions
|
|
945
|
-
)
|
|
946
|
-
);
|
|
947
|
-
}
|
|
948
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
949
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
950
|
-
);
|
|
951
|
-
|
|
952
|
-
let interceptorPromise = authenticationPromise;
|
|
953
|
-
for (const interceptor of this.interceptors) {
|
|
954
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
955
|
-
interceptor(localVarRequestOptions)
|
|
956
|
-
);
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
return interceptorPromise.then(() => {
|
|
960
|
-
if (Object.keys(localVarFormParams).length) {
|
|
961
|
-
if (localVarUseFormData) {
|
|
962
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
963
|
-
} else {
|
|
964
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
return new Promise<{
|
|
968
|
-
response: http.IncomingMessage;
|
|
969
|
-
body: CreateInvites200Response;
|
|
970
|
-
}>((resolve, reject) => {
|
|
971
|
-
localVarRequest(
|
|
972
|
-
localVarRequestOptions,
|
|
973
|
-
(error, response, body) => {
|
|
974
|
-
if (error) {
|
|
975
|
-
reject(error);
|
|
976
|
-
} else {
|
|
977
|
-
if (
|
|
978
|
-
response.statusCode &&
|
|
979
|
-
response.statusCode >= 200 &&
|
|
980
|
-
response.statusCode <= 299
|
|
981
|
-
) {
|
|
982
|
-
body = ObjectSerializer.deserialize(
|
|
983
|
-
body,
|
|
984
|
-
'CreateInvites200Response'
|
|
985
|
-
);
|
|
986
|
-
resolve({ response: response, body: body });
|
|
987
|
-
} else {
|
|
988
|
-
reject(
|
|
989
|
-
new HttpError(
|
|
990
|
-
response,
|
|
991
|
-
body,
|
|
992
|
-
response.statusCode
|
|
993
|
-
)
|
|
994
|
-
);
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
);
|
|
999
|
-
});
|
|
1000
|
-
});
|
|
1001
|
-
}
|
|
1002
|
-
/**
|
|
1003
|
-
* Invites a list of users to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Non-Segment User Invited to Workspace * Policy Created * New Segment User Invited to Workspace Config API omitted fields: - `parent` The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1004
|
-
* @summary Create Invites
|
|
1005
|
-
* @param CreateInvitesV1Input
|
|
1006
|
-
*/
|
|
1007
|
-
public async createInvitesV1(
|
|
1008
|
-
CreateInvitesV1Input: CreateInvitesV1Input,
|
|
1009
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1010
|
-
): Promise<{
|
|
1011
|
-
response: http.IncomingMessage;
|
|
1012
|
-
body: CreateInvites200Response;
|
|
1013
|
-
}> {
|
|
1014
|
-
const localVarPath = this.basePath + '/invites';
|
|
1015
|
-
let localVarQueryParameters: any = {};
|
|
1016
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1017
|
-
{},
|
|
1018
|
-
this._defaultHeaders
|
|
1019
|
-
);
|
|
1020
|
-
const produces = [
|
|
1021
|
-
'application/vnd.segment.v1+json',
|
|
1022
|
-
'application/json',
|
|
1023
|
-
];
|
|
1024
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1025
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1026
|
-
} else {
|
|
1027
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1028
|
-
}
|
|
1029
|
-
let localVarFormParams: any = {};
|
|
1030
|
-
|
|
1031
|
-
// verify required parameter 'CreateInvitesV1Input' is not null or undefined
|
|
1032
|
-
if (
|
|
1033
|
-
CreateInvitesV1Input === null ||
|
|
1034
|
-
CreateInvitesV1Input === undefined
|
|
1035
|
-
) {
|
|
1036
|
-
throw new Error(
|
|
1037
|
-
'Required parameter CreateInvitesV1Input was null or undefined when calling createInvitesV1.'
|
|
1038
|
-
);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1042
|
-
|
|
1043
|
-
let localVarUseFormData = false;
|
|
1044
|
-
|
|
1045
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1046
|
-
method: 'POST',
|
|
1047
|
-
qs: localVarQueryParameters,
|
|
1048
|
-
headers: localVarHeaderParams,
|
|
1049
|
-
uri: localVarPath,
|
|
1050
|
-
useQuerystring: this._useQuerystring,
|
|
1051
|
-
json: true,
|
|
1052
|
-
body: ObjectSerializer.serialize(
|
|
1053
|
-
CreateInvitesV1Input,
|
|
1054
|
-
'CreateInvitesV1Input'
|
|
1055
|
-
),
|
|
1056
|
-
};
|
|
1057
|
-
|
|
1058
|
-
let authenticationPromise = Promise.resolve();
|
|
1059
|
-
if (this.authentications.token.accessToken) {
|
|
1060
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1061
|
-
this.authentications.token.applyToRequest(
|
|
1062
|
-
localVarRequestOptions
|
|
1063
|
-
)
|
|
1064
|
-
);
|
|
1065
|
-
}
|
|
1066
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1067
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1068
|
-
);
|
|
1069
|
-
|
|
1070
|
-
let interceptorPromise = authenticationPromise;
|
|
1071
|
-
for (const interceptor of this.interceptors) {
|
|
1072
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1073
|
-
interceptor(localVarRequestOptions)
|
|
1074
|
-
);
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
return interceptorPromise.then(() => {
|
|
1078
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1079
|
-
if (localVarUseFormData) {
|
|
1080
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1081
|
-
} else {
|
|
1082
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
return new Promise<{
|
|
1086
|
-
response: http.IncomingMessage;
|
|
1087
|
-
body: CreateInvites200Response;
|
|
1088
|
-
}>((resolve, reject) => {
|
|
1089
|
-
localVarRequest(
|
|
1090
|
-
localVarRequestOptions,
|
|
1091
|
-
(error, response, body) => {
|
|
1092
|
-
if (error) {
|
|
1093
|
-
reject(error);
|
|
1094
|
-
} else {
|
|
1095
|
-
if (
|
|
1096
|
-
response.statusCode &&
|
|
1097
|
-
response.statusCode >= 200 &&
|
|
1098
|
-
response.statusCode <= 299
|
|
1099
|
-
) {
|
|
1100
|
-
body = ObjectSerializer.deserialize(
|
|
1101
|
-
body,
|
|
1102
|
-
'CreateInvites200Response'
|
|
1103
|
-
);
|
|
1104
|
-
resolve({ response: response, body: body });
|
|
1105
|
-
} else {
|
|
1106
|
-
reject(
|
|
1107
|
-
new HttpError(
|
|
1108
|
-
response,
|
|
1109
|
-
body,
|
|
1110
|
-
response.statusCode
|
|
1111
|
-
)
|
|
1112
|
-
);
|
|
1113
|
-
}
|
|
1114
|
-
}
|
|
1115
|
-
}
|
|
1116
|
-
);
|
|
1117
|
-
});
|
|
1118
|
-
});
|
|
1119
|
-
}
|
|
1120
|
-
/**
|
|
1121
|
-
* Removes a list of invitations to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1122
|
-
* @summary Delete Invites
|
|
1123
|
-
* @param emails The list of emails to delete invites for. This parameter exists in alpha.
|
|
1124
|
-
*/
|
|
1125
|
-
public async deleteInvitesAlpha(
|
|
1126
|
-
emails: Array<string>,
|
|
1127
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1128
|
-
): Promise<{
|
|
1129
|
-
response: http.IncomingMessage;
|
|
1130
|
-
body: DeleteInvites200Response;
|
|
1131
|
-
}> {
|
|
1132
|
-
const localVarPath = this.basePath + '/invites';
|
|
1133
|
-
let localVarQueryParameters: any = {};
|
|
1134
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1135
|
-
{},
|
|
1136
|
-
this._defaultHeaders
|
|
1137
|
-
);
|
|
1138
|
-
const produces = [
|
|
1139
|
-
'application/vnd.segment.v1alpha+json',
|
|
1140
|
-
'application/json',
|
|
1141
|
-
];
|
|
1142
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1143
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1144
|
-
} else {
|
|
1145
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1146
|
-
}
|
|
1147
|
-
let localVarFormParams: any = {};
|
|
1148
|
-
|
|
1149
|
-
// verify required parameter 'emails' is not null or undefined
|
|
1150
|
-
if (emails === null || emails === undefined) {
|
|
1151
|
-
throw new Error(
|
|
1152
|
-
'Required parameter emails was null or undefined when calling deleteInvitesAlpha.'
|
|
1153
|
-
);
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
if (emails !== undefined) {
|
|
1157
|
-
localVarQueryParameters['emails'] = ObjectSerializer.serialize(
|
|
1158
|
-
emails,
|
|
1159
|
-
'Array<string>'
|
|
1160
|
-
);
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1164
|
-
|
|
1165
|
-
let localVarUseFormData = false;
|
|
1166
|
-
|
|
1167
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1168
|
-
method: 'DELETE',
|
|
1169
|
-
qs: localVarQueryParameters,
|
|
1170
|
-
headers: localVarHeaderParams,
|
|
1171
|
-
uri: localVarPath,
|
|
1172
|
-
useQuerystring: this._useQuerystring,
|
|
1173
|
-
json: true,
|
|
1174
|
-
};
|
|
1175
|
-
|
|
1176
|
-
let authenticationPromise = Promise.resolve();
|
|
1177
|
-
if (this.authentications.token.accessToken) {
|
|
1178
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1179
|
-
this.authentications.token.applyToRequest(
|
|
1180
|
-
localVarRequestOptions
|
|
1181
|
-
)
|
|
1182
|
-
);
|
|
1183
|
-
}
|
|
1184
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1185
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1186
|
-
);
|
|
1187
|
-
|
|
1188
|
-
let interceptorPromise = authenticationPromise;
|
|
1189
|
-
for (const interceptor of this.interceptors) {
|
|
1190
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1191
|
-
interceptor(localVarRequestOptions)
|
|
1192
|
-
);
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
return interceptorPromise.then(() => {
|
|
1196
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1197
|
-
if (localVarUseFormData) {
|
|
1198
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1199
|
-
} else {
|
|
1200
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
return new Promise<{
|
|
1204
|
-
response: http.IncomingMessage;
|
|
1205
|
-
body: DeleteInvites200Response;
|
|
1206
|
-
}>((resolve, reject) => {
|
|
1207
|
-
localVarRequest(
|
|
1208
|
-
localVarRequestOptions,
|
|
1209
|
-
(error, response, body) => {
|
|
1210
|
-
if (error) {
|
|
1211
|
-
reject(error);
|
|
1212
|
-
} else {
|
|
1213
|
-
if (
|
|
1214
|
-
response.statusCode &&
|
|
1215
|
-
response.statusCode >= 200 &&
|
|
1216
|
-
response.statusCode <= 299
|
|
1217
|
-
) {
|
|
1218
|
-
body = ObjectSerializer.deserialize(
|
|
1219
|
-
body,
|
|
1220
|
-
'DeleteInvites200Response'
|
|
1221
|
-
);
|
|
1222
|
-
resolve({ response: response, body: body });
|
|
1223
|
-
} else {
|
|
1224
|
-
reject(
|
|
1225
|
-
new HttpError(
|
|
1226
|
-
response,
|
|
1227
|
-
body,
|
|
1228
|
-
response.statusCode
|
|
1229
|
-
)
|
|
1230
|
-
);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
);
|
|
1235
|
-
});
|
|
1236
|
-
});
|
|
1237
|
-
}
|
|
1238
|
-
/**
|
|
1239
|
-
* Removes a list of invitations to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1240
|
-
* @summary Delete Invites
|
|
1241
|
-
* @param emails The list of emails to delete invites for. This parameter exists in alpha.
|
|
1242
|
-
*/
|
|
1243
|
-
public async deleteInvitesBeta(
|
|
1244
|
-
emails: Array<string>,
|
|
1245
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1246
|
-
): Promise<{
|
|
1247
|
-
response: http.IncomingMessage;
|
|
1248
|
-
body: DeleteInvites200Response;
|
|
1249
|
-
}> {
|
|
1250
|
-
const localVarPath = this.basePath + '/invites';
|
|
1251
|
-
let localVarQueryParameters: any = {};
|
|
1252
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1253
|
-
{},
|
|
1254
|
-
this._defaultHeaders
|
|
1255
|
-
);
|
|
1256
|
-
const produces = [
|
|
1257
|
-
'application/vnd.segment.v1beta+json',
|
|
1258
|
-
'application/json',
|
|
1259
|
-
];
|
|
1260
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1261
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1262
|
-
} else {
|
|
1263
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1264
|
-
}
|
|
1265
|
-
let localVarFormParams: any = {};
|
|
1266
|
-
|
|
1267
|
-
// verify required parameter 'emails' is not null or undefined
|
|
1268
|
-
if (emails === null || emails === undefined) {
|
|
1269
|
-
throw new Error(
|
|
1270
|
-
'Required parameter emails was null or undefined when calling deleteInvitesBeta.'
|
|
1271
|
-
);
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
if (emails !== undefined) {
|
|
1275
|
-
localVarQueryParameters['emails'] = ObjectSerializer.serialize(
|
|
1276
|
-
emails,
|
|
1277
|
-
'Array<string>'
|
|
1278
|
-
);
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1282
|
-
|
|
1283
|
-
let localVarUseFormData = false;
|
|
1284
|
-
|
|
1285
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1286
|
-
method: 'DELETE',
|
|
1287
|
-
qs: localVarQueryParameters,
|
|
1288
|
-
headers: localVarHeaderParams,
|
|
1289
|
-
uri: localVarPath,
|
|
1290
|
-
useQuerystring: this._useQuerystring,
|
|
1291
|
-
json: true,
|
|
1292
|
-
};
|
|
1293
|
-
|
|
1294
|
-
let authenticationPromise = Promise.resolve();
|
|
1295
|
-
if (this.authentications.token.accessToken) {
|
|
1296
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1297
|
-
this.authentications.token.applyToRequest(
|
|
1298
|
-
localVarRequestOptions
|
|
1299
|
-
)
|
|
1300
|
-
);
|
|
1301
|
-
}
|
|
1302
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1303
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1304
|
-
);
|
|
1305
|
-
|
|
1306
|
-
let interceptorPromise = authenticationPromise;
|
|
1307
|
-
for (const interceptor of this.interceptors) {
|
|
1308
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1309
|
-
interceptor(localVarRequestOptions)
|
|
1310
|
-
);
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
return interceptorPromise.then(() => {
|
|
1314
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1315
|
-
if (localVarUseFormData) {
|
|
1316
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1317
|
-
} else {
|
|
1318
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
return new Promise<{
|
|
1322
|
-
response: http.IncomingMessage;
|
|
1323
|
-
body: DeleteInvites200Response;
|
|
1324
|
-
}>((resolve, reject) => {
|
|
1325
|
-
localVarRequest(
|
|
1326
|
-
localVarRequestOptions,
|
|
1327
|
-
(error, response, body) => {
|
|
1328
|
-
if (error) {
|
|
1329
|
-
reject(error);
|
|
1330
|
-
} else {
|
|
1331
|
-
if (
|
|
1332
|
-
response.statusCode &&
|
|
1333
|
-
response.statusCode >= 200 &&
|
|
1334
|
-
response.statusCode <= 299
|
|
1335
|
-
) {
|
|
1336
|
-
body = ObjectSerializer.deserialize(
|
|
1337
|
-
body,
|
|
1338
|
-
'DeleteInvites200Response'
|
|
1339
|
-
);
|
|
1340
|
-
resolve({ response: response, body: body });
|
|
1341
|
-
} else {
|
|
1342
|
-
reject(
|
|
1343
|
-
new HttpError(
|
|
1344
|
-
response,
|
|
1345
|
-
body,
|
|
1346
|
-
response.statusCode
|
|
1347
|
-
)
|
|
1348
|
-
);
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
);
|
|
1353
|
-
});
|
|
1354
|
-
});
|
|
1355
|
-
}
|
|
1356
|
-
/**
|
|
1357
|
-
* Removes a list of invitations to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1358
|
-
* @summary Delete Invites
|
|
1359
|
-
* @param emails The list of emails to delete invites for. This parameter exists in alpha.
|
|
1360
|
-
*/
|
|
1361
|
-
public async deleteInvitesCurrent(
|
|
1362
|
-
emails: Array<string>,
|
|
1363
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1364
|
-
): Promise<{
|
|
1365
|
-
response: http.IncomingMessage;
|
|
1366
|
-
body: DeleteInvites200Response;
|
|
1367
|
-
}> {
|
|
1368
|
-
const localVarPath = this.basePath + '/invites';
|
|
1369
|
-
let localVarQueryParameters: any = {};
|
|
1370
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1371
|
-
{},
|
|
1372
|
-
this._defaultHeaders
|
|
1373
|
-
);
|
|
1374
|
-
const produces = ['application/json'];
|
|
1375
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1376
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1377
|
-
} else {
|
|
1378
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1379
|
-
}
|
|
1380
|
-
let localVarFormParams: any = {};
|
|
1381
|
-
|
|
1382
|
-
// verify required parameter 'emails' is not null or undefined
|
|
1383
|
-
if (emails === null || emails === undefined) {
|
|
1384
|
-
throw new Error(
|
|
1385
|
-
'Required parameter emails was null or undefined when calling deleteInvitesCurrent.'
|
|
1386
|
-
);
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
if (emails !== undefined) {
|
|
1390
|
-
localVarQueryParameters['emails'] = ObjectSerializer.serialize(
|
|
1391
|
-
emails,
|
|
1392
|
-
'Array<string>'
|
|
1393
|
-
);
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1397
|
-
|
|
1398
|
-
let localVarUseFormData = false;
|
|
1399
|
-
|
|
1400
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1401
|
-
method: 'DELETE',
|
|
1402
|
-
qs: localVarQueryParameters,
|
|
1403
|
-
headers: localVarHeaderParams,
|
|
1404
|
-
uri: localVarPath,
|
|
1405
|
-
useQuerystring: this._useQuerystring,
|
|
1406
|
-
json: true,
|
|
1407
|
-
};
|
|
1408
|
-
|
|
1409
|
-
let authenticationPromise = Promise.resolve();
|
|
1410
|
-
if (this.authentications.token.accessToken) {
|
|
1411
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1412
|
-
this.authentications.token.applyToRequest(
|
|
1413
|
-
localVarRequestOptions
|
|
1414
|
-
)
|
|
1415
|
-
);
|
|
1416
|
-
}
|
|
1417
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1418
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1419
|
-
);
|
|
1420
|
-
|
|
1421
|
-
let interceptorPromise = authenticationPromise;
|
|
1422
|
-
for (const interceptor of this.interceptors) {
|
|
1423
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1424
|
-
interceptor(localVarRequestOptions)
|
|
1425
|
-
);
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
return interceptorPromise.then(() => {
|
|
1429
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1430
|
-
if (localVarUseFormData) {
|
|
1431
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1432
|
-
} else {
|
|
1433
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1434
|
-
}
|
|
1435
|
-
}
|
|
1436
|
-
return new Promise<{
|
|
1437
|
-
response: http.IncomingMessage;
|
|
1438
|
-
body: DeleteInvites200Response;
|
|
1439
|
-
}>((resolve, reject) => {
|
|
1440
|
-
localVarRequest(
|
|
1441
|
-
localVarRequestOptions,
|
|
1442
|
-
(error, response, body) => {
|
|
1443
|
-
if (error) {
|
|
1444
|
-
reject(error);
|
|
1445
|
-
} else {
|
|
1446
|
-
if (
|
|
1447
|
-
response.statusCode &&
|
|
1448
|
-
response.statusCode >= 200 &&
|
|
1449
|
-
response.statusCode <= 299
|
|
1450
|
-
) {
|
|
1451
|
-
body = ObjectSerializer.deserialize(
|
|
1452
|
-
body,
|
|
1453
|
-
'DeleteInvites200Response'
|
|
1454
|
-
);
|
|
1455
|
-
resolve({ response: response, body: body });
|
|
1456
|
-
} else {
|
|
1457
|
-
reject(
|
|
1458
|
-
new HttpError(
|
|
1459
|
-
response,
|
|
1460
|
-
body,
|
|
1461
|
-
response.statusCode
|
|
1462
|
-
)
|
|
1463
|
-
);
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
);
|
|
1468
|
-
});
|
|
1469
|
-
});
|
|
1470
|
-
}
|
|
1471
|
-
/**
|
|
1472
|
-
* Removes a list of invitations to join a Workspace. When called, this endpoint may generate one or more of the following [Audit Trail](/tag/Audit-Trail) events: * Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1473
|
-
* @summary Delete Invites
|
|
1474
|
-
* @param emails The list of emails to delete invites for. This parameter exists in alpha.
|
|
1475
|
-
*/
|
|
1476
|
-
public async deleteInvitesV1(
|
|
1477
|
-
emails: Array<string>,
|
|
1478
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1479
|
-
): Promise<{
|
|
1480
|
-
response: http.IncomingMessage;
|
|
1481
|
-
body: DeleteInvites200Response;
|
|
1482
|
-
}> {
|
|
1483
|
-
const localVarPath = this.basePath + '/invites';
|
|
1484
|
-
let localVarQueryParameters: any = {};
|
|
1485
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1486
|
-
{},
|
|
1487
|
-
this._defaultHeaders
|
|
1488
|
-
);
|
|
1489
|
-
const produces = [
|
|
1490
|
-
'application/vnd.segment.v1+json',
|
|
1491
|
-
'application/json',
|
|
1492
|
-
];
|
|
1493
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1494
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1495
|
-
} else {
|
|
1496
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1497
|
-
}
|
|
1498
|
-
let localVarFormParams: any = {};
|
|
1499
|
-
|
|
1500
|
-
// verify required parameter 'emails' is not null or undefined
|
|
1501
|
-
if (emails === null || emails === undefined) {
|
|
1502
|
-
throw new Error(
|
|
1503
|
-
'Required parameter emails was null or undefined when calling deleteInvitesV1.'
|
|
1504
|
-
);
|
|
1505
|
-
}
|
|
1506
|
-
|
|
1507
|
-
if (emails !== undefined) {
|
|
1508
|
-
localVarQueryParameters['emails'] = ObjectSerializer.serialize(
|
|
1509
|
-
emails,
|
|
1510
|
-
'Array<string>'
|
|
1511
|
-
);
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1515
|
-
|
|
1516
|
-
let localVarUseFormData = false;
|
|
1517
|
-
|
|
1518
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1519
|
-
method: 'DELETE',
|
|
1520
|
-
qs: localVarQueryParameters,
|
|
1521
|
-
headers: localVarHeaderParams,
|
|
1522
|
-
uri: localVarPath,
|
|
1523
|
-
useQuerystring: this._useQuerystring,
|
|
1524
|
-
json: true,
|
|
1525
|
-
};
|
|
1526
|
-
|
|
1527
|
-
let authenticationPromise = Promise.resolve();
|
|
1528
|
-
if (this.authentications.token.accessToken) {
|
|
1529
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1530
|
-
this.authentications.token.applyToRequest(
|
|
1531
|
-
localVarRequestOptions
|
|
1532
|
-
)
|
|
1533
|
-
);
|
|
1534
|
-
}
|
|
1535
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1536
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1537
|
-
);
|
|
1538
|
-
|
|
1539
|
-
let interceptorPromise = authenticationPromise;
|
|
1540
|
-
for (const interceptor of this.interceptors) {
|
|
1541
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1542
|
-
interceptor(localVarRequestOptions)
|
|
1543
|
-
);
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
return interceptorPromise.then(() => {
|
|
1547
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1548
|
-
if (localVarUseFormData) {
|
|
1549
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1550
|
-
} else {
|
|
1551
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1552
|
-
}
|
|
1553
|
-
}
|
|
1554
|
-
return new Promise<{
|
|
1555
|
-
response: http.IncomingMessage;
|
|
1556
|
-
body: DeleteInvites200Response;
|
|
1557
|
-
}>((resolve, reject) => {
|
|
1558
|
-
localVarRequest(
|
|
1559
|
-
localVarRequestOptions,
|
|
1560
|
-
(error, response, body) => {
|
|
1561
|
-
if (error) {
|
|
1562
|
-
reject(error);
|
|
1563
|
-
} else {
|
|
1564
|
-
if (
|
|
1565
|
-
response.statusCode &&
|
|
1566
|
-
response.statusCode >= 200 &&
|
|
1567
|
-
response.statusCode <= 299
|
|
1568
|
-
) {
|
|
1569
|
-
body = ObjectSerializer.deserialize(
|
|
1570
|
-
body,
|
|
1571
|
-
'DeleteInvites200Response'
|
|
1572
|
-
);
|
|
1573
|
-
resolve({ response: response, body: body });
|
|
1574
|
-
} else {
|
|
1575
|
-
reject(
|
|
1576
|
-
new HttpError(
|
|
1577
|
-
response,
|
|
1578
|
-
body,
|
|
1579
|
-
response.statusCode
|
|
1580
|
-
)
|
|
1581
|
-
);
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
}
|
|
1585
|
-
);
|
|
1586
|
-
});
|
|
1587
|
-
});
|
|
1588
|
-
}
|
|
1589
|
-
/**
|
|
1590
|
-
* Removes one or multiple users. When called, this endpoint may generate the `Group Memberships Deleted` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1591
|
-
* @summary Delete Users
|
|
1592
|
-
* @param userIds The ids of the users to remove. This parameter exists in alpha.
|
|
1593
|
-
*/
|
|
1594
|
-
public async deleteUsersAlpha(
|
|
1595
|
-
userIds: Array<string>,
|
|
1596
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1597
|
-
): Promise<{
|
|
1598
|
-
response: http.IncomingMessage;
|
|
1599
|
-
body: DeleteUsers200Response;
|
|
1600
|
-
}> {
|
|
1601
|
-
const localVarPath = this.basePath + '/users';
|
|
1602
|
-
let localVarQueryParameters: any = {};
|
|
1603
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1604
|
-
{},
|
|
1605
|
-
this._defaultHeaders
|
|
1606
|
-
);
|
|
1607
|
-
const produces = [
|
|
1608
|
-
'application/vnd.segment.v1alpha+json',
|
|
1609
|
-
'application/json',
|
|
1610
|
-
];
|
|
1611
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1612
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1613
|
-
} else {
|
|
1614
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1615
|
-
}
|
|
1616
|
-
let localVarFormParams: any = {};
|
|
1617
|
-
|
|
1618
|
-
// verify required parameter 'userIds' is not null or undefined
|
|
1619
|
-
if (userIds === null || userIds === undefined) {
|
|
1620
|
-
throw new Error(
|
|
1621
|
-
'Required parameter userIds was null or undefined when calling deleteUsersAlpha.'
|
|
1622
|
-
);
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
if (userIds !== undefined) {
|
|
1626
|
-
localVarQueryParameters['userIds'] = ObjectSerializer.serialize(
|
|
1627
|
-
userIds,
|
|
1628
|
-
'Array<string>'
|
|
1629
|
-
);
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1633
|
-
|
|
1634
|
-
let localVarUseFormData = false;
|
|
1635
|
-
|
|
1636
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1637
|
-
method: 'DELETE',
|
|
1638
|
-
qs: localVarQueryParameters,
|
|
1639
|
-
headers: localVarHeaderParams,
|
|
1640
|
-
uri: localVarPath,
|
|
1641
|
-
useQuerystring: this._useQuerystring,
|
|
1642
|
-
json: true,
|
|
1643
|
-
};
|
|
1644
|
-
|
|
1645
|
-
let authenticationPromise = Promise.resolve();
|
|
1646
|
-
if (this.authentications.token.accessToken) {
|
|
1647
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1648
|
-
this.authentications.token.applyToRequest(
|
|
1649
|
-
localVarRequestOptions
|
|
1650
|
-
)
|
|
1651
|
-
);
|
|
1652
|
-
}
|
|
1653
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1654
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1655
|
-
);
|
|
1656
|
-
|
|
1657
|
-
let interceptorPromise = authenticationPromise;
|
|
1658
|
-
for (const interceptor of this.interceptors) {
|
|
1659
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1660
|
-
interceptor(localVarRequestOptions)
|
|
1661
|
-
);
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
return interceptorPromise.then(() => {
|
|
1665
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1666
|
-
if (localVarUseFormData) {
|
|
1667
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1668
|
-
} else {
|
|
1669
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
return new Promise<{
|
|
1673
|
-
response: http.IncomingMessage;
|
|
1674
|
-
body: DeleteUsers200Response;
|
|
1675
|
-
}>((resolve, reject) => {
|
|
1676
|
-
localVarRequest(
|
|
1677
|
-
localVarRequestOptions,
|
|
1678
|
-
(error, response, body) => {
|
|
1679
|
-
if (error) {
|
|
1680
|
-
reject(error);
|
|
1681
|
-
} else {
|
|
1682
|
-
if (
|
|
1683
|
-
response.statusCode &&
|
|
1684
|
-
response.statusCode >= 200 &&
|
|
1685
|
-
response.statusCode <= 299
|
|
1686
|
-
) {
|
|
1687
|
-
body = ObjectSerializer.deserialize(
|
|
1688
|
-
body,
|
|
1689
|
-
'DeleteUsers200Response'
|
|
1690
|
-
);
|
|
1691
|
-
resolve({ response: response, body: body });
|
|
1692
|
-
} else {
|
|
1693
|
-
reject(
|
|
1694
|
-
new HttpError(
|
|
1695
|
-
response,
|
|
1696
|
-
body,
|
|
1697
|
-
response.statusCode
|
|
1698
|
-
)
|
|
1699
|
-
);
|
|
1700
|
-
}
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
);
|
|
1704
|
-
});
|
|
1705
|
-
});
|
|
1706
|
-
}
|
|
1707
|
-
/**
|
|
1708
|
-
* Removes one or multiple users. When called, this endpoint may generate the `Group Memberships Deleted` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1709
|
-
* @summary Delete Users
|
|
1710
|
-
* @param userIds The ids of the users to remove. This parameter exists in alpha.
|
|
1711
|
-
*/
|
|
1712
|
-
public async deleteUsersBeta(
|
|
1713
|
-
userIds: Array<string>,
|
|
1714
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1715
|
-
): Promise<{
|
|
1716
|
-
response: http.IncomingMessage;
|
|
1717
|
-
body: DeleteUsers200Response;
|
|
1718
|
-
}> {
|
|
1719
|
-
const localVarPath = this.basePath + '/users';
|
|
1720
|
-
let localVarQueryParameters: any = {};
|
|
1721
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1722
|
-
{},
|
|
1723
|
-
this._defaultHeaders
|
|
1724
|
-
);
|
|
1725
|
-
const produces = [
|
|
1726
|
-
'application/vnd.segment.v1beta+json',
|
|
1727
|
-
'application/json',
|
|
1728
|
-
];
|
|
1729
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1730
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1731
|
-
} else {
|
|
1732
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1733
|
-
}
|
|
1734
|
-
let localVarFormParams: any = {};
|
|
1735
|
-
|
|
1736
|
-
// verify required parameter 'userIds' is not null or undefined
|
|
1737
|
-
if (userIds === null || userIds === undefined) {
|
|
1738
|
-
throw new Error(
|
|
1739
|
-
'Required parameter userIds was null or undefined when calling deleteUsersBeta.'
|
|
1740
|
-
);
|
|
1741
|
-
}
|
|
1742
|
-
|
|
1743
|
-
if (userIds !== undefined) {
|
|
1744
|
-
localVarQueryParameters['userIds'] = ObjectSerializer.serialize(
|
|
1745
|
-
userIds,
|
|
1746
|
-
'Array<string>'
|
|
1747
|
-
);
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1751
|
-
|
|
1752
|
-
let localVarUseFormData = false;
|
|
1753
|
-
|
|
1754
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1755
|
-
method: 'DELETE',
|
|
1756
|
-
qs: localVarQueryParameters,
|
|
1757
|
-
headers: localVarHeaderParams,
|
|
1758
|
-
uri: localVarPath,
|
|
1759
|
-
useQuerystring: this._useQuerystring,
|
|
1760
|
-
json: true,
|
|
1761
|
-
};
|
|
1762
|
-
|
|
1763
|
-
let authenticationPromise = Promise.resolve();
|
|
1764
|
-
if (this.authentications.token.accessToken) {
|
|
1765
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1766
|
-
this.authentications.token.applyToRequest(
|
|
1767
|
-
localVarRequestOptions
|
|
1768
|
-
)
|
|
1769
|
-
);
|
|
1770
|
-
}
|
|
1771
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1772
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1773
|
-
);
|
|
1774
|
-
|
|
1775
|
-
let interceptorPromise = authenticationPromise;
|
|
1776
|
-
for (const interceptor of this.interceptors) {
|
|
1777
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1778
|
-
interceptor(localVarRequestOptions)
|
|
1779
|
-
);
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
return interceptorPromise.then(() => {
|
|
1783
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1784
|
-
if (localVarUseFormData) {
|
|
1785
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1786
|
-
} else {
|
|
1787
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
return new Promise<{
|
|
1791
|
-
response: http.IncomingMessage;
|
|
1792
|
-
body: DeleteUsers200Response;
|
|
1793
|
-
}>((resolve, reject) => {
|
|
1794
|
-
localVarRequest(
|
|
1795
|
-
localVarRequestOptions,
|
|
1796
|
-
(error, response, body) => {
|
|
1797
|
-
if (error) {
|
|
1798
|
-
reject(error);
|
|
1799
|
-
} else {
|
|
1800
|
-
if (
|
|
1801
|
-
response.statusCode &&
|
|
1802
|
-
response.statusCode >= 200 &&
|
|
1803
|
-
response.statusCode <= 299
|
|
1804
|
-
) {
|
|
1805
|
-
body = ObjectSerializer.deserialize(
|
|
1806
|
-
body,
|
|
1807
|
-
'DeleteUsers200Response'
|
|
1808
|
-
);
|
|
1809
|
-
resolve({ response: response, body: body });
|
|
1810
|
-
} else {
|
|
1811
|
-
reject(
|
|
1812
|
-
new HttpError(
|
|
1813
|
-
response,
|
|
1814
|
-
body,
|
|
1815
|
-
response.statusCode
|
|
1816
|
-
)
|
|
1817
|
-
);
|
|
1818
|
-
}
|
|
1819
|
-
}
|
|
1820
|
-
}
|
|
1821
|
-
);
|
|
1822
|
-
});
|
|
1823
|
-
});
|
|
1824
|
-
}
|
|
1825
|
-
/**
|
|
1826
|
-
* Removes one or multiple users. When called, this endpoint may generate the `Group Memberships Deleted` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1827
|
-
* @summary Delete Users
|
|
1828
|
-
* @param userIds The ids of the users to remove. This parameter exists in alpha.
|
|
1829
|
-
*/
|
|
1830
|
-
public async deleteUsersCurrent(
|
|
1831
|
-
userIds: Array<string>,
|
|
1832
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1833
|
-
): Promise<{
|
|
1834
|
-
response: http.IncomingMessage;
|
|
1835
|
-
body: DeleteUsers200Response;
|
|
1836
|
-
}> {
|
|
1837
|
-
const localVarPath = this.basePath + '/users';
|
|
1838
|
-
let localVarQueryParameters: any = {};
|
|
1839
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1840
|
-
{},
|
|
1841
|
-
this._defaultHeaders
|
|
1842
|
-
);
|
|
1843
|
-
const produces = ['application/json'];
|
|
1844
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1845
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1846
|
-
} else {
|
|
1847
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1848
|
-
}
|
|
1849
|
-
let localVarFormParams: any = {};
|
|
1850
|
-
|
|
1851
|
-
// verify required parameter 'userIds' is not null or undefined
|
|
1852
|
-
if (userIds === null || userIds === undefined) {
|
|
1853
|
-
throw new Error(
|
|
1854
|
-
'Required parameter userIds was null or undefined when calling deleteUsersCurrent.'
|
|
1855
|
-
);
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
if (userIds !== undefined) {
|
|
1859
|
-
localVarQueryParameters['userIds'] = ObjectSerializer.serialize(
|
|
1860
|
-
userIds,
|
|
1861
|
-
'Array<string>'
|
|
1862
|
-
);
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1866
|
-
|
|
1867
|
-
let localVarUseFormData = false;
|
|
1868
|
-
|
|
1869
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1870
|
-
method: 'DELETE',
|
|
1871
|
-
qs: localVarQueryParameters,
|
|
1872
|
-
headers: localVarHeaderParams,
|
|
1873
|
-
uri: localVarPath,
|
|
1874
|
-
useQuerystring: this._useQuerystring,
|
|
1875
|
-
json: true,
|
|
1876
|
-
};
|
|
1877
|
-
|
|
1878
|
-
let authenticationPromise = Promise.resolve();
|
|
1879
|
-
if (this.authentications.token.accessToken) {
|
|
1880
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1881
|
-
this.authentications.token.applyToRequest(
|
|
1882
|
-
localVarRequestOptions
|
|
1883
|
-
)
|
|
1884
|
-
);
|
|
1885
|
-
}
|
|
1886
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1887
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
1888
|
-
);
|
|
1889
|
-
|
|
1890
|
-
let interceptorPromise = authenticationPromise;
|
|
1891
|
-
for (const interceptor of this.interceptors) {
|
|
1892
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
1893
|
-
interceptor(localVarRequestOptions)
|
|
1894
|
-
);
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
|
-
return interceptorPromise.then(() => {
|
|
1898
|
-
if (Object.keys(localVarFormParams).length) {
|
|
1899
|
-
if (localVarUseFormData) {
|
|
1900
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
1901
|
-
} else {
|
|
1902
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
1903
|
-
}
|
|
1904
|
-
}
|
|
1905
|
-
return new Promise<{
|
|
1906
|
-
response: http.IncomingMessage;
|
|
1907
|
-
body: DeleteUsers200Response;
|
|
1908
|
-
}>((resolve, reject) => {
|
|
1909
|
-
localVarRequest(
|
|
1910
|
-
localVarRequestOptions,
|
|
1911
|
-
(error, response, body) => {
|
|
1912
|
-
if (error) {
|
|
1913
|
-
reject(error);
|
|
1914
|
-
} else {
|
|
1915
|
-
if (
|
|
1916
|
-
response.statusCode &&
|
|
1917
|
-
response.statusCode >= 200 &&
|
|
1918
|
-
response.statusCode <= 299
|
|
1919
|
-
) {
|
|
1920
|
-
body = ObjectSerializer.deserialize(
|
|
1921
|
-
body,
|
|
1922
|
-
'DeleteUsers200Response'
|
|
1923
|
-
);
|
|
1924
|
-
resolve({ response: response, body: body });
|
|
1925
|
-
} else {
|
|
1926
|
-
reject(
|
|
1927
|
-
new HttpError(
|
|
1928
|
-
response,
|
|
1929
|
-
body,
|
|
1930
|
-
response.statusCode
|
|
1931
|
-
)
|
|
1932
|
-
);
|
|
1933
|
-
}
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
);
|
|
1937
|
-
});
|
|
1938
|
-
});
|
|
1939
|
-
}
|
|
1940
|
-
/**
|
|
1941
|
-
* Removes one or multiple users. When called, this endpoint may generate the `Group Memberships Deleted` [Audit Trail](/tag/Audit-Trail) event. The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
1942
|
-
* @summary Delete Users
|
|
1943
|
-
* @param userIds The ids of the users to remove. This parameter exists in alpha.
|
|
1944
|
-
*/
|
|
1945
|
-
public async deleteUsersV1(
|
|
1946
|
-
userIds: Array<string>,
|
|
1947
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
1948
|
-
): Promise<{
|
|
1949
|
-
response: http.IncomingMessage;
|
|
1950
|
-
body: DeleteUsers200Response;
|
|
1951
|
-
}> {
|
|
1952
|
-
const localVarPath = this.basePath + '/users';
|
|
1953
|
-
let localVarQueryParameters: any = {};
|
|
1954
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
1955
|
-
{},
|
|
1956
|
-
this._defaultHeaders
|
|
1957
|
-
);
|
|
1958
|
-
const produces = [
|
|
1959
|
-
'application/vnd.segment.v1+json',
|
|
1960
|
-
'application/json',
|
|
1961
|
-
];
|
|
1962
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
1963
|
-
localVarHeaderParams.Accept = produces[0];
|
|
1964
|
-
} else {
|
|
1965
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
1966
|
-
}
|
|
1967
|
-
let localVarFormParams: any = {};
|
|
1968
|
-
|
|
1969
|
-
// verify required parameter 'userIds' is not null or undefined
|
|
1970
|
-
if (userIds === null || userIds === undefined) {
|
|
1971
|
-
throw new Error(
|
|
1972
|
-
'Required parameter userIds was null or undefined when calling deleteUsersV1.'
|
|
1973
|
-
);
|
|
1974
|
-
}
|
|
1975
|
-
|
|
1976
|
-
if (userIds !== undefined) {
|
|
1977
|
-
localVarQueryParameters['userIds'] = ObjectSerializer.serialize(
|
|
1978
|
-
userIds,
|
|
1979
|
-
'Array<string>'
|
|
1980
|
-
);
|
|
1981
|
-
}
|
|
1982
|
-
|
|
1983
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
1984
|
-
|
|
1985
|
-
let localVarUseFormData = false;
|
|
1986
|
-
|
|
1987
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
1988
|
-
method: 'DELETE',
|
|
1989
|
-
qs: localVarQueryParameters,
|
|
1990
|
-
headers: localVarHeaderParams,
|
|
1991
|
-
uri: localVarPath,
|
|
1992
|
-
useQuerystring: this._useQuerystring,
|
|
1993
|
-
json: true,
|
|
1994
|
-
};
|
|
1995
|
-
|
|
1996
|
-
let authenticationPromise = Promise.resolve();
|
|
1997
|
-
if (this.authentications.token.accessToken) {
|
|
1998
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
1999
|
-
this.authentications.token.applyToRequest(
|
|
2000
|
-
localVarRequestOptions
|
|
2001
|
-
)
|
|
2002
|
-
);
|
|
2003
|
-
}
|
|
2004
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2005
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2006
|
-
);
|
|
2007
|
-
|
|
2008
|
-
let interceptorPromise = authenticationPromise;
|
|
2009
|
-
for (const interceptor of this.interceptors) {
|
|
2010
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2011
|
-
interceptor(localVarRequestOptions)
|
|
2012
|
-
);
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
return interceptorPromise.then(() => {
|
|
2016
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2017
|
-
if (localVarUseFormData) {
|
|
2018
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2019
|
-
} else {
|
|
2020
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2021
|
-
}
|
|
2022
|
-
}
|
|
2023
|
-
return new Promise<{
|
|
2024
|
-
response: http.IncomingMessage;
|
|
2025
|
-
body: DeleteUsers200Response;
|
|
2026
|
-
}>((resolve, reject) => {
|
|
2027
|
-
localVarRequest(
|
|
2028
|
-
localVarRequestOptions,
|
|
2029
|
-
(error, response, body) => {
|
|
2030
|
-
if (error) {
|
|
2031
|
-
reject(error);
|
|
2032
|
-
} else {
|
|
2033
|
-
if (
|
|
2034
|
-
response.statusCode &&
|
|
2035
|
-
response.statusCode >= 200 &&
|
|
2036
|
-
response.statusCode <= 299
|
|
2037
|
-
) {
|
|
2038
|
-
body = ObjectSerializer.deserialize(
|
|
2039
|
-
body,
|
|
2040
|
-
'DeleteUsers200Response'
|
|
2041
|
-
);
|
|
2042
|
-
resolve({ response: response, body: body });
|
|
2043
|
-
} else {
|
|
2044
|
-
reject(
|
|
2045
|
-
new HttpError(
|
|
2046
|
-
response,
|
|
2047
|
-
body,
|
|
2048
|
-
response.statusCode
|
|
2049
|
-
)
|
|
2050
|
-
);
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
);
|
|
2055
|
-
});
|
|
2056
|
-
});
|
|
2057
|
-
}
|
|
2058
|
-
/**
|
|
2059
|
-
* Returns a user given their id.
|
|
2060
|
-
* @summary Get User
|
|
2061
|
-
* @param userId
|
|
2062
|
-
*/
|
|
2063
|
-
public async getUserAlpha(
|
|
2064
|
-
userId: string,
|
|
2065
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2066
|
-
): Promise<{ response: http.IncomingMessage; body: GetUser200Response }> {
|
|
2067
|
-
const localVarPath =
|
|
2068
|
-
this.basePath +
|
|
2069
|
-
'/users/{userId}'.replace(
|
|
2070
|
-
'{' + 'userId' + '}',
|
|
2071
|
-
encodeURIComponent(String(userId))
|
|
2072
|
-
);
|
|
2073
|
-
let localVarQueryParameters: any = {};
|
|
2074
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2075
|
-
{},
|
|
2076
|
-
this._defaultHeaders
|
|
2077
|
-
);
|
|
2078
|
-
const produces = [
|
|
2079
|
-
'application/vnd.segment.v1alpha+json',
|
|
2080
|
-
'application/json',
|
|
2081
|
-
];
|
|
2082
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2083
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2084
|
-
} else {
|
|
2085
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2086
|
-
}
|
|
2087
|
-
let localVarFormParams: any = {};
|
|
2088
|
-
|
|
2089
|
-
// verify required parameter 'userId' is not null or undefined
|
|
2090
|
-
if (userId === null || userId === undefined) {
|
|
2091
|
-
throw new Error(
|
|
2092
|
-
'Required parameter userId was null or undefined when calling getUserAlpha.'
|
|
2093
|
-
);
|
|
2094
|
-
}
|
|
2095
|
-
|
|
2096
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2097
|
-
|
|
2098
|
-
let localVarUseFormData = false;
|
|
2099
|
-
|
|
2100
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2101
|
-
method: 'GET',
|
|
2102
|
-
qs: localVarQueryParameters,
|
|
2103
|
-
headers: localVarHeaderParams,
|
|
2104
|
-
uri: localVarPath,
|
|
2105
|
-
useQuerystring: this._useQuerystring,
|
|
2106
|
-
json: true,
|
|
2107
|
-
};
|
|
2108
|
-
|
|
2109
|
-
let authenticationPromise = Promise.resolve();
|
|
2110
|
-
if (this.authentications.token.accessToken) {
|
|
2111
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2112
|
-
this.authentications.token.applyToRequest(
|
|
2113
|
-
localVarRequestOptions
|
|
2114
|
-
)
|
|
2115
|
-
);
|
|
2116
|
-
}
|
|
2117
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2118
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2119
|
-
);
|
|
2120
|
-
|
|
2121
|
-
let interceptorPromise = authenticationPromise;
|
|
2122
|
-
for (const interceptor of this.interceptors) {
|
|
2123
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2124
|
-
interceptor(localVarRequestOptions)
|
|
2125
|
-
);
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
return interceptorPromise.then(() => {
|
|
2129
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2130
|
-
if (localVarUseFormData) {
|
|
2131
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2132
|
-
} else {
|
|
2133
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
return new Promise<{
|
|
2137
|
-
response: http.IncomingMessage;
|
|
2138
|
-
body: GetUser200Response;
|
|
2139
|
-
}>((resolve, reject) => {
|
|
2140
|
-
localVarRequest(
|
|
2141
|
-
localVarRequestOptions,
|
|
2142
|
-
(error, response, body) => {
|
|
2143
|
-
if (error) {
|
|
2144
|
-
reject(error);
|
|
2145
|
-
} else {
|
|
2146
|
-
if (
|
|
2147
|
-
response.statusCode &&
|
|
2148
|
-
response.statusCode >= 200 &&
|
|
2149
|
-
response.statusCode <= 299
|
|
2150
|
-
) {
|
|
2151
|
-
body = ObjectSerializer.deserialize(
|
|
2152
|
-
body,
|
|
2153
|
-
'GetUser200Response'
|
|
2154
|
-
);
|
|
2155
|
-
resolve({ response: response, body: body });
|
|
2156
|
-
} else {
|
|
2157
|
-
reject(
|
|
2158
|
-
new HttpError(
|
|
2159
|
-
response,
|
|
2160
|
-
body,
|
|
2161
|
-
response.statusCode
|
|
2162
|
-
)
|
|
2163
|
-
);
|
|
2164
|
-
}
|
|
2165
|
-
}
|
|
2166
|
-
}
|
|
2167
|
-
);
|
|
2168
|
-
});
|
|
2169
|
-
});
|
|
2170
|
-
}
|
|
2171
|
-
/**
|
|
2172
|
-
* Returns a user given their id.
|
|
2173
|
-
* @summary Get User
|
|
2174
|
-
* @param userId
|
|
2175
|
-
*/
|
|
2176
|
-
public async getUserBeta(
|
|
2177
|
-
userId: string,
|
|
2178
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2179
|
-
): Promise<{ response: http.IncomingMessage; body: GetUser200Response }> {
|
|
2180
|
-
const localVarPath =
|
|
2181
|
-
this.basePath +
|
|
2182
|
-
'/users/{userId}'.replace(
|
|
2183
|
-
'{' + 'userId' + '}',
|
|
2184
|
-
encodeURIComponent(String(userId))
|
|
2185
|
-
);
|
|
2186
|
-
let localVarQueryParameters: any = {};
|
|
2187
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2188
|
-
{},
|
|
2189
|
-
this._defaultHeaders
|
|
2190
|
-
);
|
|
2191
|
-
const produces = [
|
|
2192
|
-
'application/vnd.segment.v1beta+json',
|
|
2193
|
-
'application/json',
|
|
2194
|
-
];
|
|
2195
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2196
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2197
|
-
} else {
|
|
2198
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2199
|
-
}
|
|
2200
|
-
let localVarFormParams: any = {};
|
|
2201
|
-
|
|
2202
|
-
// verify required parameter 'userId' is not null or undefined
|
|
2203
|
-
if (userId === null || userId === undefined) {
|
|
2204
|
-
throw new Error(
|
|
2205
|
-
'Required parameter userId was null or undefined when calling getUserBeta.'
|
|
2206
|
-
);
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2210
|
-
|
|
2211
|
-
let localVarUseFormData = false;
|
|
2212
|
-
|
|
2213
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2214
|
-
method: 'GET',
|
|
2215
|
-
qs: localVarQueryParameters,
|
|
2216
|
-
headers: localVarHeaderParams,
|
|
2217
|
-
uri: localVarPath,
|
|
2218
|
-
useQuerystring: this._useQuerystring,
|
|
2219
|
-
json: true,
|
|
2220
|
-
};
|
|
2221
|
-
|
|
2222
|
-
let authenticationPromise = Promise.resolve();
|
|
2223
|
-
if (this.authentications.token.accessToken) {
|
|
2224
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2225
|
-
this.authentications.token.applyToRequest(
|
|
2226
|
-
localVarRequestOptions
|
|
2227
|
-
)
|
|
2228
|
-
);
|
|
2229
|
-
}
|
|
2230
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2231
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2232
|
-
);
|
|
2233
|
-
|
|
2234
|
-
let interceptorPromise = authenticationPromise;
|
|
2235
|
-
for (const interceptor of this.interceptors) {
|
|
2236
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2237
|
-
interceptor(localVarRequestOptions)
|
|
2238
|
-
);
|
|
2239
|
-
}
|
|
2240
|
-
|
|
2241
|
-
return interceptorPromise.then(() => {
|
|
2242
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2243
|
-
if (localVarUseFormData) {
|
|
2244
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2245
|
-
} else {
|
|
2246
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
return new Promise<{
|
|
2250
|
-
response: http.IncomingMessage;
|
|
2251
|
-
body: GetUser200Response;
|
|
2252
|
-
}>((resolve, reject) => {
|
|
2253
|
-
localVarRequest(
|
|
2254
|
-
localVarRequestOptions,
|
|
2255
|
-
(error, response, body) => {
|
|
2256
|
-
if (error) {
|
|
2257
|
-
reject(error);
|
|
2258
|
-
} else {
|
|
2259
|
-
if (
|
|
2260
|
-
response.statusCode &&
|
|
2261
|
-
response.statusCode >= 200 &&
|
|
2262
|
-
response.statusCode <= 299
|
|
2263
|
-
) {
|
|
2264
|
-
body = ObjectSerializer.deserialize(
|
|
2265
|
-
body,
|
|
2266
|
-
'GetUser200Response'
|
|
2267
|
-
);
|
|
2268
|
-
resolve({ response: response, body: body });
|
|
2269
|
-
} else {
|
|
2270
|
-
reject(
|
|
2271
|
-
new HttpError(
|
|
2272
|
-
response,
|
|
2273
|
-
body,
|
|
2274
|
-
response.statusCode
|
|
2275
|
-
)
|
|
2276
|
-
);
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
}
|
|
2280
|
-
);
|
|
2281
|
-
});
|
|
2282
|
-
});
|
|
2283
|
-
}
|
|
2284
|
-
/**
|
|
2285
|
-
* Returns a user given their id.
|
|
2286
|
-
* @summary Get User
|
|
2287
|
-
* @param userId
|
|
2288
|
-
*/
|
|
2289
|
-
public async getUserCurrent(
|
|
2290
|
-
userId: string,
|
|
2291
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2292
|
-
): Promise<{ response: http.IncomingMessage; body: GetUser200Response }> {
|
|
2293
|
-
const localVarPath =
|
|
2294
|
-
this.basePath +
|
|
2295
|
-
'/users/{userId}'.replace(
|
|
2296
|
-
'{' + 'userId' + '}',
|
|
2297
|
-
encodeURIComponent(String(userId))
|
|
2298
|
-
);
|
|
2299
|
-
let localVarQueryParameters: any = {};
|
|
2300
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2301
|
-
{},
|
|
2302
|
-
this._defaultHeaders
|
|
2303
|
-
);
|
|
2304
|
-
const produces = ['application/json'];
|
|
2305
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2306
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2307
|
-
} else {
|
|
2308
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2309
|
-
}
|
|
2310
|
-
let localVarFormParams: any = {};
|
|
2311
|
-
|
|
2312
|
-
// verify required parameter 'userId' is not null or undefined
|
|
2313
|
-
if (userId === null || userId === undefined) {
|
|
2314
|
-
throw new Error(
|
|
2315
|
-
'Required parameter userId was null or undefined when calling getUserCurrent.'
|
|
2316
|
-
);
|
|
2317
|
-
}
|
|
2318
|
-
|
|
2319
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2320
|
-
|
|
2321
|
-
let localVarUseFormData = false;
|
|
2322
|
-
|
|
2323
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2324
|
-
method: 'GET',
|
|
2325
|
-
qs: localVarQueryParameters,
|
|
2326
|
-
headers: localVarHeaderParams,
|
|
2327
|
-
uri: localVarPath,
|
|
2328
|
-
useQuerystring: this._useQuerystring,
|
|
2329
|
-
json: true,
|
|
2330
|
-
};
|
|
2331
|
-
|
|
2332
|
-
let authenticationPromise = Promise.resolve();
|
|
2333
|
-
if (this.authentications.token.accessToken) {
|
|
2334
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2335
|
-
this.authentications.token.applyToRequest(
|
|
2336
|
-
localVarRequestOptions
|
|
2337
|
-
)
|
|
2338
|
-
);
|
|
2339
|
-
}
|
|
2340
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2341
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2342
|
-
);
|
|
2343
|
-
|
|
2344
|
-
let interceptorPromise = authenticationPromise;
|
|
2345
|
-
for (const interceptor of this.interceptors) {
|
|
2346
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2347
|
-
interceptor(localVarRequestOptions)
|
|
2348
|
-
);
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
return interceptorPromise.then(() => {
|
|
2352
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2353
|
-
if (localVarUseFormData) {
|
|
2354
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2355
|
-
} else {
|
|
2356
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2357
|
-
}
|
|
2358
|
-
}
|
|
2359
|
-
return new Promise<{
|
|
2360
|
-
response: http.IncomingMessage;
|
|
2361
|
-
body: GetUser200Response;
|
|
2362
|
-
}>((resolve, reject) => {
|
|
2363
|
-
localVarRequest(
|
|
2364
|
-
localVarRequestOptions,
|
|
2365
|
-
(error, response, body) => {
|
|
2366
|
-
if (error) {
|
|
2367
|
-
reject(error);
|
|
2368
|
-
} else {
|
|
2369
|
-
if (
|
|
2370
|
-
response.statusCode &&
|
|
2371
|
-
response.statusCode >= 200 &&
|
|
2372
|
-
response.statusCode <= 299
|
|
2373
|
-
) {
|
|
2374
|
-
body = ObjectSerializer.deserialize(
|
|
2375
|
-
body,
|
|
2376
|
-
'GetUser200Response'
|
|
2377
|
-
);
|
|
2378
|
-
resolve({ response: response, body: body });
|
|
2379
|
-
} else {
|
|
2380
|
-
reject(
|
|
2381
|
-
new HttpError(
|
|
2382
|
-
response,
|
|
2383
|
-
body,
|
|
2384
|
-
response.statusCode
|
|
2385
|
-
)
|
|
2386
|
-
);
|
|
2387
|
-
}
|
|
2388
|
-
}
|
|
2389
|
-
}
|
|
2390
|
-
);
|
|
2391
|
-
});
|
|
2392
|
-
});
|
|
2393
|
-
}
|
|
2394
|
-
/**
|
|
2395
|
-
* Returns a user given their id.
|
|
2396
|
-
* @summary Get User
|
|
2397
|
-
* @param userId
|
|
2398
|
-
*/
|
|
2399
|
-
public async getUserV1(
|
|
2400
|
-
userId: string,
|
|
2401
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2402
|
-
): Promise<{ response: http.IncomingMessage; body: GetUser200Response }> {
|
|
2403
|
-
const localVarPath =
|
|
2404
|
-
this.basePath +
|
|
2405
|
-
'/users/{userId}'.replace(
|
|
2406
|
-
'{' + 'userId' + '}',
|
|
2407
|
-
encodeURIComponent(String(userId))
|
|
2408
|
-
);
|
|
2409
|
-
let localVarQueryParameters: any = {};
|
|
2410
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2411
|
-
{},
|
|
2412
|
-
this._defaultHeaders
|
|
2413
|
-
);
|
|
2414
|
-
const produces = [
|
|
2415
|
-
'application/vnd.segment.v1+json',
|
|
2416
|
-
'application/json',
|
|
2417
|
-
];
|
|
2418
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2419
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2420
|
-
} else {
|
|
2421
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2422
|
-
}
|
|
2423
|
-
let localVarFormParams: any = {};
|
|
2424
|
-
|
|
2425
|
-
// verify required parameter 'userId' is not null or undefined
|
|
2426
|
-
if (userId === null || userId === undefined) {
|
|
2427
|
-
throw new Error(
|
|
2428
|
-
'Required parameter userId was null or undefined when calling getUserV1.'
|
|
2429
|
-
);
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2433
|
-
|
|
2434
|
-
let localVarUseFormData = false;
|
|
2435
|
-
|
|
2436
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2437
|
-
method: 'GET',
|
|
2438
|
-
qs: localVarQueryParameters,
|
|
2439
|
-
headers: localVarHeaderParams,
|
|
2440
|
-
uri: localVarPath,
|
|
2441
|
-
useQuerystring: this._useQuerystring,
|
|
2442
|
-
json: true,
|
|
2443
|
-
};
|
|
2444
|
-
|
|
2445
|
-
let authenticationPromise = Promise.resolve();
|
|
2446
|
-
if (this.authentications.token.accessToken) {
|
|
2447
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2448
|
-
this.authentications.token.applyToRequest(
|
|
2449
|
-
localVarRequestOptions
|
|
2450
|
-
)
|
|
2451
|
-
);
|
|
2452
|
-
}
|
|
2453
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2454
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2455
|
-
);
|
|
2456
|
-
|
|
2457
|
-
let interceptorPromise = authenticationPromise;
|
|
2458
|
-
for (const interceptor of this.interceptors) {
|
|
2459
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2460
|
-
interceptor(localVarRequestOptions)
|
|
2461
|
-
);
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
return interceptorPromise.then(() => {
|
|
2465
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2466
|
-
if (localVarUseFormData) {
|
|
2467
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2468
|
-
} else {
|
|
2469
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2470
|
-
}
|
|
2471
|
-
}
|
|
2472
|
-
return new Promise<{
|
|
2473
|
-
response: http.IncomingMessage;
|
|
2474
|
-
body: GetUser200Response;
|
|
2475
|
-
}>((resolve, reject) => {
|
|
2476
|
-
localVarRequest(
|
|
2477
|
-
localVarRequestOptions,
|
|
2478
|
-
(error, response, body) => {
|
|
2479
|
-
if (error) {
|
|
2480
|
-
reject(error);
|
|
2481
|
-
} else {
|
|
2482
|
-
if (
|
|
2483
|
-
response.statusCode &&
|
|
2484
|
-
response.statusCode >= 200 &&
|
|
2485
|
-
response.statusCode <= 299
|
|
2486
|
-
) {
|
|
2487
|
-
body = ObjectSerializer.deserialize(
|
|
2488
|
-
body,
|
|
2489
|
-
'GetUser200Response'
|
|
2490
|
-
);
|
|
2491
|
-
resolve({ response: response, body: body });
|
|
2492
|
-
} else {
|
|
2493
|
-
reject(
|
|
2494
|
-
new HttpError(
|
|
2495
|
-
response,
|
|
2496
|
-
body,
|
|
2497
|
-
response.statusCode
|
|
2498
|
-
)
|
|
2499
|
-
);
|
|
2500
|
-
}
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
);
|
|
2504
|
-
});
|
|
2505
|
-
});
|
|
2506
|
-
}
|
|
2507
|
-
/**
|
|
2508
|
-
* Returns a list of invitations to join a Workspace. Config API omitted fields: - `parent`
|
|
2509
|
-
* @summary List Invites
|
|
2510
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
2511
|
-
*/
|
|
2512
|
-
public async listInvitesAlpha(
|
|
2513
|
-
pagination: PaginationInput,
|
|
2514
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2515
|
-
): Promise<{
|
|
2516
|
-
response: http.IncomingMessage;
|
|
2517
|
-
body: ListInvites200Response;
|
|
2518
|
-
}> {
|
|
2519
|
-
const localVarPath = this.basePath + '/invites';
|
|
2520
|
-
let localVarQueryParameters: any = {};
|
|
2521
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2522
|
-
{},
|
|
2523
|
-
this._defaultHeaders
|
|
2524
|
-
);
|
|
2525
|
-
const produces = [
|
|
2526
|
-
'application/vnd.segment.v1alpha+json',
|
|
2527
|
-
'application/json',
|
|
2528
|
-
];
|
|
2529
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2530
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2531
|
-
} else {
|
|
2532
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2533
|
-
}
|
|
2534
|
-
let localVarFormParams: any = {};
|
|
2535
|
-
|
|
2536
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
2537
|
-
if (pagination === null || pagination === undefined) {
|
|
2538
|
-
throw new Error(
|
|
2539
|
-
'Required parameter pagination was null or undefined when calling listInvitesAlpha.'
|
|
2540
|
-
);
|
|
2541
|
-
}
|
|
2542
|
-
|
|
2543
|
-
if (pagination !== undefined) {
|
|
2544
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2545
|
-
pagination,
|
|
2546
|
-
'PaginationInput'
|
|
2547
|
-
);
|
|
2548
|
-
}
|
|
2549
|
-
|
|
2550
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2551
|
-
|
|
2552
|
-
let localVarUseFormData = false;
|
|
2553
|
-
|
|
2554
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2555
|
-
method: 'GET',
|
|
2556
|
-
qs: localVarQueryParameters,
|
|
2557
|
-
headers: localVarHeaderParams,
|
|
2558
|
-
uri: localVarPath,
|
|
2559
|
-
useQuerystring: this._useQuerystring,
|
|
2560
|
-
json: true,
|
|
2561
|
-
};
|
|
2562
|
-
|
|
2563
|
-
let authenticationPromise = Promise.resolve();
|
|
2564
|
-
if (this.authentications.token.accessToken) {
|
|
2565
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2566
|
-
this.authentications.token.applyToRequest(
|
|
2567
|
-
localVarRequestOptions
|
|
2568
|
-
)
|
|
2569
|
-
);
|
|
2570
|
-
}
|
|
2571
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2572
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2573
|
-
);
|
|
2574
|
-
|
|
2575
|
-
let interceptorPromise = authenticationPromise;
|
|
2576
|
-
for (const interceptor of this.interceptors) {
|
|
2577
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2578
|
-
interceptor(localVarRequestOptions)
|
|
2579
|
-
);
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
return interceptorPromise.then(() => {
|
|
2583
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2584
|
-
if (localVarUseFormData) {
|
|
2585
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2586
|
-
} else {
|
|
2587
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2588
|
-
}
|
|
2589
|
-
}
|
|
2590
|
-
return new Promise<{
|
|
2591
|
-
response: http.IncomingMessage;
|
|
2592
|
-
body: ListInvites200Response;
|
|
2593
|
-
}>((resolve, reject) => {
|
|
2594
|
-
localVarRequest(
|
|
2595
|
-
localVarRequestOptions,
|
|
2596
|
-
(error, response, body) => {
|
|
2597
|
-
if (error) {
|
|
2598
|
-
reject(error);
|
|
2599
|
-
} else {
|
|
2600
|
-
if (
|
|
2601
|
-
response.statusCode &&
|
|
2602
|
-
response.statusCode >= 200 &&
|
|
2603
|
-
response.statusCode <= 299
|
|
2604
|
-
) {
|
|
2605
|
-
body = ObjectSerializer.deserialize(
|
|
2606
|
-
body,
|
|
2607
|
-
'ListInvites200Response'
|
|
2608
|
-
);
|
|
2609
|
-
resolve({ response: response, body: body });
|
|
2610
|
-
} else {
|
|
2611
|
-
reject(
|
|
2612
|
-
new HttpError(
|
|
2613
|
-
response,
|
|
2614
|
-
body,
|
|
2615
|
-
response.statusCode
|
|
2616
|
-
)
|
|
2617
|
-
);
|
|
2618
|
-
}
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
);
|
|
2622
|
-
});
|
|
2623
|
-
});
|
|
2624
|
-
}
|
|
2625
|
-
/**
|
|
2626
|
-
* Returns a list of invitations to join a Workspace. Config API omitted fields: - `parent`
|
|
2627
|
-
* @summary List Invites
|
|
2628
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
2629
|
-
*/
|
|
2630
|
-
public async listInvitesBeta(
|
|
2631
|
-
pagination: PaginationInput,
|
|
2632
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2633
|
-
): Promise<{
|
|
2634
|
-
response: http.IncomingMessage;
|
|
2635
|
-
body: ListInvites200Response;
|
|
2636
|
-
}> {
|
|
2637
|
-
const localVarPath = this.basePath + '/invites';
|
|
2638
|
-
let localVarQueryParameters: any = {};
|
|
2639
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2640
|
-
{},
|
|
2641
|
-
this._defaultHeaders
|
|
2642
|
-
);
|
|
2643
|
-
const produces = [
|
|
2644
|
-
'application/vnd.segment.v1beta+json',
|
|
2645
|
-
'application/json',
|
|
2646
|
-
];
|
|
2647
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2648
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2649
|
-
} else {
|
|
2650
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2651
|
-
}
|
|
2652
|
-
let localVarFormParams: any = {};
|
|
2653
|
-
|
|
2654
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
2655
|
-
if (pagination === null || pagination === undefined) {
|
|
2656
|
-
throw new Error(
|
|
2657
|
-
'Required parameter pagination was null or undefined when calling listInvitesBeta.'
|
|
2658
|
-
);
|
|
2659
|
-
}
|
|
2660
|
-
|
|
2661
|
-
if (pagination !== undefined) {
|
|
2662
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2663
|
-
pagination,
|
|
2664
|
-
'PaginationInput'
|
|
2665
|
-
);
|
|
2666
|
-
}
|
|
2667
|
-
|
|
2668
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2669
|
-
|
|
2670
|
-
let localVarUseFormData = false;
|
|
2671
|
-
|
|
2672
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2673
|
-
method: 'GET',
|
|
2674
|
-
qs: localVarQueryParameters,
|
|
2675
|
-
headers: localVarHeaderParams,
|
|
2676
|
-
uri: localVarPath,
|
|
2677
|
-
useQuerystring: this._useQuerystring,
|
|
2678
|
-
json: true,
|
|
2679
|
-
};
|
|
2680
|
-
|
|
2681
|
-
let authenticationPromise = Promise.resolve();
|
|
2682
|
-
if (this.authentications.token.accessToken) {
|
|
2683
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2684
|
-
this.authentications.token.applyToRequest(
|
|
2685
|
-
localVarRequestOptions
|
|
2686
|
-
)
|
|
2687
|
-
);
|
|
2688
|
-
}
|
|
2689
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2690
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2691
|
-
);
|
|
2692
|
-
|
|
2693
|
-
let interceptorPromise = authenticationPromise;
|
|
2694
|
-
for (const interceptor of this.interceptors) {
|
|
2695
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2696
|
-
interceptor(localVarRequestOptions)
|
|
2697
|
-
);
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
return interceptorPromise.then(() => {
|
|
2701
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2702
|
-
if (localVarUseFormData) {
|
|
2703
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2704
|
-
} else {
|
|
2705
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
return new Promise<{
|
|
2709
|
-
response: http.IncomingMessage;
|
|
2710
|
-
body: ListInvites200Response;
|
|
2711
|
-
}>((resolve, reject) => {
|
|
2712
|
-
localVarRequest(
|
|
2713
|
-
localVarRequestOptions,
|
|
2714
|
-
(error, response, body) => {
|
|
2715
|
-
if (error) {
|
|
2716
|
-
reject(error);
|
|
2717
|
-
} else {
|
|
2718
|
-
if (
|
|
2719
|
-
response.statusCode &&
|
|
2720
|
-
response.statusCode >= 200 &&
|
|
2721
|
-
response.statusCode <= 299
|
|
2722
|
-
) {
|
|
2723
|
-
body = ObjectSerializer.deserialize(
|
|
2724
|
-
body,
|
|
2725
|
-
'ListInvites200Response'
|
|
2726
|
-
);
|
|
2727
|
-
resolve({ response: response, body: body });
|
|
2728
|
-
} else {
|
|
2729
|
-
reject(
|
|
2730
|
-
new HttpError(
|
|
2731
|
-
response,
|
|
2732
|
-
body,
|
|
2733
|
-
response.statusCode
|
|
2734
|
-
)
|
|
2735
|
-
);
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
2739
|
-
);
|
|
2740
|
-
});
|
|
2741
|
-
});
|
|
2742
|
-
}
|
|
2743
|
-
/**
|
|
2744
|
-
* Returns a list of invitations to join a Workspace. Config API omitted fields: - `parent`
|
|
2745
|
-
* @summary List Invites
|
|
2746
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
2747
|
-
*/
|
|
2748
|
-
public async listInvitesCurrent(
|
|
2749
|
-
pagination: PaginationInput,
|
|
2750
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2751
|
-
): Promise<{
|
|
2752
|
-
response: http.IncomingMessage;
|
|
2753
|
-
body: ListInvites200Response;
|
|
2754
|
-
}> {
|
|
2755
|
-
const localVarPath = this.basePath + '/invites';
|
|
2756
|
-
let localVarQueryParameters: any = {};
|
|
2757
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2758
|
-
{},
|
|
2759
|
-
this._defaultHeaders
|
|
2760
|
-
);
|
|
2761
|
-
const produces = ['application/json'];
|
|
2762
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2763
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2764
|
-
} else {
|
|
2765
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2766
|
-
}
|
|
2767
|
-
let localVarFormParams: any = {};
|
|
2768
|
-
|
|
2769
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
2770
|
-
if (pagination === null || pagination === undefined) {
|
|
2771
|
-
throw new Error(
|
|
2772
|
-
'Required parameter pagination was null or undefined when calling listInvitesCurrent.'
|
|
2773
|
-
);
|
|
2774
|
-
}
|
|
2775
|
-
|
|
2776
|
-
if (pagination !== undefined) {
|
|
2777
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2778
|
-
pagination,
|
|
2779
|
-
'PaginationInput'
|
|
2780
|
-
);
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2784
|
-
|
|
2785
|
-
let localVarUseFormData = false;
|
|
2786
|
-
|
|
2787
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2788
|
-
method: 'GET',
|
|
2789
|
-
qs: localVarQueryParameters,
|
|
2790
|
-
headers: localVarHeaderParams,
|
|
2791
|
-
uri: localVarPath,
|
|
2792
|
-
useQuerystring: this._useQuerystring,
|
|
2793
|
-
json: true,
|
|
2794
|
-
};
|
|
2795
|
-
|
|
2796
|
-
let authenticationPromise = Promise.resolve();
|
|
2797
|
-
if (this.authentications.token.accessToken) {
|
|
2798
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2799
|
-
this.authentications.token.applyToRequest(
|
|
2800
|
-
localVarRequestOptions
|
|
2801
|
-
)
|
|
2802
|
-
);
|
|
2803
|
-
}
|
|
2804
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2805
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2806
|
-
);
|
|
2807
|
-
|
|
2808
|
-
let interceptorPromise = authenticationPromise;
|
|
2809
|
-
for (const interceptor of this.interceptors) {
|
|
2810
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2811
|
-
interceptor(localVarRequestOptions)
|
|
2812
|
-
);
|
|
2813
|
-
}
|
|
2814
|
-
|
|
2815
|
-
return interceptorPromise.then(() => {
|
|
2816
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2817
|
-
if (localVarUseFormData) {
|
|
2818
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2819
|
-
} else {
|
|
2820
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
return new Promise<{
|
|
2824
|
-
response: http.IncomingMessage;
|
|
2825
|
-
body: ListInvites200Response;
|
|
2826
|
-
}>((resolve, reject) => {
|
|
2827
|
-
localVarRequest(
|
|
2828
|
-
localVarRequestOptions,
|
|
2829
|
-
(error, response, body) => {
|
|
2830
|
-
if (error) {
|
|
2831
|
-
reject(error);
|
|
2832
|
-
} else {
|
|
2833
|
-
if (
|
|
2834
|
-
response.statusCode &&
|
|
2835
|
-
response.statusCode >= 200 &&
|
|
2836
|
-
response.statusCode <= 299
|
|
2837
|
-
) {
|
|
2838
|
-
body = ObjectSerializer.deserialize(
|
|
2839
|
-
body,
|
|
2840
|
-
'ListInvites200Response'
|
|
2841
|
-
);
|
|
2842
|
-
resolve({ response: response, body: body });
|
|
2843
|
-
} else {
|
|
2844
|
-
reject(
|
|
2845
|
-
new HttpError(
|
|
2846
|
-
response,
|
|
2847
|
-
body,
|
|
2848
|
-
response.statusCode
|
|
2849
|
-
)
|
|
2850
|
-
);
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
}
|
|
2854
|
-
);
|
|
2855
|
-
});
|
|
2856
|
-
});
|
|
2857
|
-
}
|
|
2858
|
-
/**
|
|
2859
|
-
* Returns a list of invitations to join a Workspace. Config API omitted fields: - `parent`
|
|
2860
|
-
* @summary List Invites
|
|
2861
|
-
* @param pagination Defines the pagination parameters. This parameter exists in alpha.
|
|
2862
|
-
*/
|
|
2863
|
-
public async listInvitesV1(
|
|
2864
|
-
pagination: PaginationInput,
|
|
2865
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2866
|
-
): Promise<{
|
|
2867
|
-
response: http.IncomingMessage;
|
|
2868
|
-
body: ListInvites200Response;
|
|
2869
|
-
}> {
|
|
2870
|
-
const localVarPath = this.basePath + '/invites';
|
|
2871
|
-
let localVarQueryParameters: any = {};
|
|
2872
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2873
|
-
{},
|
|
2874
|
-
this._defaultHeaders
|
|
2875
|
-
);
|
|
2876
|
-
const produces = [
|
|
2877
|
-
'application/vnd.segment.v1+json',
|
|
2878
|
-
'application/json',
|
|
2879
|
-
];
|
|
2880
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
2881
|
-
localVarHeaderParams.Accept = produces[0];
|
|
2882
|
-
} else {
|
|
2883
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
2884
|
-
}
|
|
2885
|
-
let localVarFormParams: any = {};
|
|
2886
|
-
|
|
2887
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
2888
|
-
if (pagination === null || pagination === undefined) {
|
|
2889
|
-
throw new Error(
|
|
2890
|
-
'Required parameter pagination was null or undefined when calling listInvitesV1.'
|
|
2891
|
-
);
|
|
2892
|
-
}
|
|
2893
|
-
|
|
2894
|
-
if (pagination !== undefined) {
|
|
2895
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
2896
|
-
pagination,
|
|
2897
|
-
'PaginationInput'
|
|
2898
|
-
);
|
|
2899
|
-
}
|
|
2900
|
-
|
|
2901
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
2902
|
-
|
|
2903
|
-
let localVarUseFormData = false;
|
|
2904
|
-
|
|
2905
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
2906
|
-
method: 'GET',
|
|
2907
|
-
qs: localVarQueryParameters,
|
|
2908
|
-
headers: localVarHeaderParams,
|
|
2909
|
-
uri: localVarPath,
|
|
2910
|
-
useQuerystring: this._useQuerystring,
|
|
2911
|
-
json: true,
|
|
2912
|
-
};
|
|
2913
|
-
|
|
2914
|
-
let authenticationPromise = Promise.resolve();
|
|
2915
|
-
if (this.authentications.token.accessToken) {
|
|
2916
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2917
|
-
this.authentications.token.applyToRequest(
|
|
2918
|
-
localVarRequestOptions
|
|
2919
|
-
)
|
|
2920
|
-
);
|
|
2921
|
-
}
|
|
2922
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
2923
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
2924
|
-
);
|
|
2925
|
-
|
|
2926
|
-
let interceptorPromise = authenticationPromise;
|
|
2927
|
-
for (const interceptor of this.interceptors) {
|
|
2928
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
2929
|
-
interceptor(localVarRequestOptions)
|
|
2930
|
-
);
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
|
-
return interceptorPromise.then(() => {
|
|
2934
|
-
if (Object.keys(localVarFormParams).length) {
|
|
2935
|
-
if (localVarUseFormData) {
|
|
2936
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
2937
|
-
} else {
|
|
2938
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
2939
|
-
}
|
|
2940
|
-
}
|
|
2941
|
-
return new Promise<{
|
|
2942
|
-
response: http.IncomingMessage;
|
|
2943
|
-
body: ListInvites200Response;
|
|
2944
|
-
}>((resolve, reject) => {
|
|
2945
|
-
localVarRequest(
|
|
2946
|
-
localVarRequestOptions,
|
|
2947
|
-
(error, response, body) => {
|
|
2948
|
-
if (error) {
|
|
2949
|
-
reject(error);
|
|
2950
|
-
} else {
|
|
2951
|
-
if (
|
|
2952
|
-
response.statusCode &&
|
|
2953
|
-
response.statusCode >= 200 &&
|
|
2954
|
-
response.statusCode <= 299
|
|
2955
|
-
) {
|
|
2956
|
-
body = ObjectSerializer.deserialize(
|
|
2957
|
-
body,
|
|
2958
|
-
'ListInvites200Response'
|
|
2959
|
-
);
|
|
2960
|
-
resolve({ response: response, body: body });
|
|
2961
|
-
} else {
|
|
2962
|
-
reject(
|
|
2963
|
-
new HttpError(
|
|
2964
|
-
response,
|
|
2965
|
-
body,
|
|
2966
|
-
response.statusCode
|
|
2967
|
-
)
|
|
2968
|
-
);
|
|
2969
|
-
}
|
|
2970
|
-
}
|
|
2971
|
-
}
|
|
2972
|
-
);
|
|
2973
|
-
});
|
|
2974
|
-
});
|
|
2975
|
-
}
|
|
2976
|
-
/**
|
|
2977
|
-
* Returns all groups a user belongs to.
|
|
2978
|
-
* @summary List User Groups from User
|
|
2979
|
-
* @param userId
|
|
2980
|
-
* @param pagination Pagination for groups. This parameter exists in alpha.
|
|
2981
|
-
*/
|
|
2982
|
-
public async listUserGroupsFromUserAlpha(
|
|
2983
|
-
userId: string,
|
|
2984
|
-
pagination: PaginationInput,
|
|
2985
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
2986
|
-
): Promise<{
|
|
2987
|
-
response: http.IncomingMessage;
|
|
2988
|
-
body: ListUserGroupsFromUser200Response;
|
|
2989
|
-
}> {
|
|
2990
|
-
const localVarPath =
|
|
2991
|
-
this.basePath +
|
|
2992
|
-
'/users/{userId}/groups'.replace(
|
|
2993
|
-
'{' + 'userId' + '}',
|
|
2994
|
-
encodeURIComponent(String(userId))
|
|
2995
|
-
);
|
|
2996
|
-
let localVarQueryParameters: any = {};
|
|
2997
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
2998
|
-
{},
|
|
2999
|
-
this._defaultHeaders
|
|
3000
|
-
);
|
|
3001
|
-
const produces = [
|
|
3002
|
-
'application/vnd.segment.v1alpha+json',
|
|
3003
|
-
'application/json',
|
|
3004
|
-
];
|
|
3005
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3006
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3007
|
-
} else {
|
|
3008
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3009
|
-
}
|
|
3010
|
-
let localVarFormParams: any = {};
|
|
3011
|
-
|
|
3012
|
-
// verify required parameter 'userId' is not null or undefined
|
|
3013
|
-
if (userId === null || userId === undefined) {
|
|
3014
|
-
throw new Error(
|
|
3015
|
-
'Required parameter userId was null or undefined when calling listUserGroupsFromUserAlpha.'
|
|
3016
|
-
);
|
|
3017
|
-
}
|
|
3018
|
-
|
|
3019
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3020
|
-
if (pagination === null || pagination === undefined) {
|
|
3021
|
-
throw new Error(
|
|
3022
|
-
'Required parameter pagination was null or undefined when calling listUserGroupsFromUserAlpha.'
|
|
3023
|
-
);
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
if (pagination !== undefined) {
|
|
3027
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3028
|
-
pagination,
|
|
3029
|
-
'PaginationInput'
|
|
3030
|
-
);
|
|
3031
|
-
}
|
|
3032
|
-
|
|
3033
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3034
|
-
|
|
3035
|
-
let localVarUseFormData = false;
|
|
3036
|
-
|
|
3037
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3038
|
-
method: 'GET',
|
|
3039
|
-
qs: localVarQueryParameters,
|
|
3040
|
-
headers: localVarHeaderParams,
|
|
3041
|
-
uri: localVarPath,
|
|
3042
|
-
useQuerystring: this._useQuerystring,
|
|
3043
|
-
json: true,
|
|
3044
|
-
};
|
|
3045
|
-
|
|
3046
|
-
let authenticationPromise = Promise.resolve();
|
|
3047
|
-
if (this.authentications.token.accessToken) {
|
|
3048
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3049
|
-
this.authentications.token.applyToRequest(
|
|
3050
|
-
localVarRequestOptions
|
|
3051
|
-
)
|
|
3052
|
-
);
|
|
3053
|
-
}
|
|
3054
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3055
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3056
|
-
);
|
|
3057
|
-
|
|
3058
|
-
let interceptorPromise = authenticationPromise;
|
|
3059
|
-
for (const interceptor of this.interceptors) {
|
|
3060
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3061
|
-
interceptor(localVarRequestOptions)
|
|
3062
|
-
);
|
|
3063
|
-
}
|
|
3064
|
-
|
|
3065
|
-
return interceptorPromise.then(() => {
|
|
3066
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3067
|
-
if (localVarUseFormData) {
|
|
3068
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3069
|
-
} else {
|
|
3070
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3071
|
-
}
|
|
3072
|
-
}
|
|
3073
|
-
return new Promise<{
|
|
3074
|
-
response: http.IncomingMessage;
|
|
3075
|
-
body: ListUserGroupsFromUser200Response;
|
|
3076
|
-
}>((resolve, reject) => {
|
|
3077
|
-
localVarRequest(
|
|
3078
|
-
localVarRequestOptions,
|
|
3079
|
-
(error, response, body) => {
|
|
3080
|
-
if (error) {
|
|
3081
|
-
reject(error);
|
|
3082
|
-
} else {
|
|
3083
|
-
if (
|
|
3084
|
-
response.statusCode &&
|
|
3085
|
-
response.statusCode >= 200 &&
|
|
3086
|
-
response.statusCode <= 299
|
|
3087
|
-
) {
|
|
3088
|
-
body = ObjectSerializer.deserialize(
|
|
3089
|
-
body,
|
|
3090
|
-
'ListUserGroupsFromUser200Response'
|
|
3091
|
-
);
|
|
3092
|
-
resolve({ response: response, body: body });
|
|
3093
|
-
} else {
|
|
3094
|
-
reject(
|
|
3095
|
-
new HttpError(
|
|
3096
|
-
response,
|
|
3097
|
-
body,
|
|
3098
|
-
response.statusCode
|
|
3099
|
-
)
|
|
3100
|
-
);
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
}
|
|
3104
|
-
);
|
|
3105
|
-
});
|
|
3106
|
-
});
|
|
3107
|
-
}
|
|
3108
|
-
/**
|
|
3109
|
-
* Returns all groups a user belongs to.
|
|
3110
|
-
* @summary List User Groups from User
|
|
3111
|
-
* @param userId
|
|
3112
|
-
* @param pagination Pagination for groups. This parameter exists in alpha.
|
|
3113
|
-
*/
|
|
3114
|
-
public async listUserGroupsFromUserBeta(
|
|
3115
|
-
userId: string,
|
|
3116
|
-
pagination: PaginationInput,
|
|
3117
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3118
|
-
): Promise<{
|
|
3119
|
-
response: http.IncomingMessage;
|
|
3120
|
-
body: ListUserGroupsFromUser200Response;
|
|
3121
|
-
}> {
|
|
3122
|
-
const localVarPath =
|
|
3123
|
-
this.basePath +
|
|
3124
|
-
'/users/{userId}/groups'.replace(
|
|
3125
|
-
'{' + 'userId' + '}',
|
|
3126
|
-
encodeURIComponent(String(userId))
|
|
3127
|
-
);
|
|
3128
|
-
let localVarQueryParameters: any = {};
|
|
3129
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3130
|
-
{},
|
|
3131
|
-
this._defaultHeaders
|
|
3132
|
-
);
|
|
3133
|
-
const produces = [
|
|
3134
|
-
'application/vnd.segment.v1beta+json',
|
|
3135
|
-
'application/json',
|
|
3136
|
-
];
|
|
3137
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3138
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3139
|
-
} else {
|
|
3140
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3141
|
-
}
|
|
3142
|
-
let localVarFormParams: any = {};
|
|
3143
|
-
|
|
3144
|
-
// verify required parameter 'userId' is not null or undefined
|
|
3145
|
-
if (userId === null || userId === undefined) {
|
|
3146
|
-
throw new Error(
|
|
3147
|
-
'Required parameter userId was null or undefined when calling listUserGroupsFromUserBeta.'
|
|
3148
|
-
);
|
|
3149
|
-
}
|
|
3150
|
-
|
|
3151
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3152
|
-
if (pagination === null || pagination === undefined) {
|
|
3153
|
-
throw new Error(
|
|
3154
|
-
'Required parameter pagination was null or undefined when calling listUserGroupsFromUserBeta.'
|
|
3155
|
-
);
|
|
3156
|
-
}
|
|
3157
|
-
|
|
3158
|
-
if (pagination !== undefined) {
|
|
3159
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3160
|
-
pagination,
|
|
3161
|
-
'PaginationInput'
|
|
3162
|
-
);
|
|
3163
|
-
}
|
|
3164
|
-
|
|
3165
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3166
|
-
|
|
3167
|
-
let localVarUseFormData = false;
|
|
3168
|
-
|
|
3169
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3170
|
-
method: 'GET',
|
|
3171
|
-
qs: localVarQueryParameters,
|
|
3172
|
-
headers: localVarHeaderParams,
|
|
3173
|
-
uri: localVarPath,
|
|
3174
|
-
useQuerystring: this._useQuerystring,
|
|
3175
|
-
json: true,
|
|
3176
|
-
};
|
|
3177
|
-
|
|
3178
|
-
let authenticationPromise = Promise.resolve();
|
|
3179
|
-
if (this.authentications.token.accessToken) {
|
|
3180
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3181
|
-
this.authentications.token.applyToRequest(
|
|
3182
|
-
localVarRequestOptions
|
|
3183
|
-
)
|
|
3184
|
-
);
|
|
3185
|
-
}
|
|
3186
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3187
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3188
|
-
);
|
|
3189
|
-
|
|
3190
|
-
let interceptorPromise = authenticationPromise;
|
|
3191
|
-
for (const interceptor of this.interceptors) {
|
|
3192
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3193
|
-
interceptor(localVarRequestOptions)
|
|
3194
|
-
);
|
|
3195
|
-
}
|
|
3196
|
-
|
|
3197
|
-
return interceptorPromise.then(() => {
|
|
3198
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3199
|
-
if (localVarUseFormData) {
|
|
3200
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3201
|
-
} else {
|
|
3202
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3203
|
-
}
|
|
3204
|
-
}
|
|
3205
|
-
return new Promise<{
|
|
3206
|
-
response: http.IncomingMessage;
|
|
3207
|
-
body: ListUserGroupsFromUser200Response;
|
|
3208
|
-
}>((resolve, reject) => {
|
|
3209
|
-
localVarRequest(
|
|
3210
|
-
localVarRequestOptions,
|
|
3211
|
-
(error, response, body) => {
|
|
3212
|
-
if (error) {
|
|
3213
|
-
reject(error);
|
|
3214
|
-
} else {
|
|
3215
|
-
if (
|
|
3216
|
-
response.statusCode &&
|
|
3217
|
-
response.statusCode >= 200 &&
|
|
3218
|
-
response.statusCode <= 299
|
|
3219
|
-
) {
|
|
3220
|
-
body = ObjectSerializer.deserialize(
|
|
3221
|
-
body,
|
|
3222
|
-
'ListUserGroupsFromUser200Response'
|
|
3223
|
-
);
|
|
3224
|
-
resolve({ response: response, body: body });
|
|
3225
|
-
} else {
|
|
3226
|
-
reject(
|
|
3227
|
-
new HttpError(
|
|
3228
|
-
response,
|
|
3229
|
-
body,
|
|
3230
|
-
response.statusCode
|
|
3231
|
-
)
|
|
3232
|
-
);
|
|
3233
|
-
}
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
);
|
|
3237
|
-
});
|
|
3238
|
-
});
|
|
3239
|
-
}
|
|
3240
|
-
/**
|
|
3241
|
-
* Returns all groups a user belongs to.
|
|
3242
|
-
* @summary List User Groups from User
|
|
3243
|
-
* @param userId
|
|
3244
|
-
* @param pagination Pagination for groups. This parameter exists in alpha.
|
|
3245
|
-
*/
|
|
3246
|
-
public async listUserGroupsFromUserCurrent(
|
|
3247
|
-
userId: string,
|
|
3248
|
-
pagination: PaginationInput,
|
|
3249
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3250
|
-
): Promise<{
|
|
3251
|
-
response: http.IncomingMessage;
|
|
3252
|
-
body: ListUserGroupsFromUser200Response;
|
|
3253
|
-
}> {
|
|
3254
|
-
const localVarPath =
|
|
3255
|
-
this.basePath +
|
|
3256
|
-
'/users/{userId}/groups'.replace(
|
|
3257
|
-
'{' + 'userId' + '}',
|
|
3258
|
-
encodeURIComponent(String(userId))
|
|
3259
|
-
);
|
|
3260
|
-
let localVarQueryParameters: any = {};
|
|
3261
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3262
|
-
{},
|
|
3263
|
-
this._defaultHeaders
|
|
3264
|
-
);
|
|
3265
|
-
const produces = ['application/json'];
|
|
3266
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3267
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3268
|
-
} else {
|
|
3269
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3270
|
-
}
|
|
3271
|
-
let localVarFormParams: any = {};
|
|
3272
|
-
|
|
3273
|
-
// verify required parameter 'userId' is not null or undefined
|
|
3274
|
-
if (userId === null || userId === undefined) {
|
|
3275
|
-
throw new Error(
|
|
3276
|
-
'Required parameter userId was null or undefined when calling listUserGroupsFromUserCurrent.'
|
|
3277
|
-
);
|
|
3278
|
-
}
|
|
3279
|
-
|
|
3280
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3281
|
-
if (pagination === null || pagination === undefined) {
|
|
3282
|
-
throw new Error(
|
|
3283
|
-
'Required parameter pagination was null or undefined when calling listUserGroupsFromUserCurrent.'
|
|
3284
|
-
);
|
|
3285
|
-
}
|
|
3286
|
-
|
|
3287
|
-
if (pagination !== undefined) {
|
|
3288
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3289
|
-
pagination,
|
|
3290
|
-
'PaginationInput'
|
|
3291
|
-
);
|
|
3292
|
-
}
|
|
3293
|
-
|
|
3294
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3295
|
-
|
|
3296
|
-
let localVarUseFormData = false;
|
|
3297
|
-
|
|
3298
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3299
|
-
method: 'GET',
|
|
3300
|
-
qs: localVarQueryParameters,
|
|
3301
|
-
headers: localVarHeaderParams,
|
|
3302
|
-
uri: localVarPath,
|
|
3303
|
-
useQuerystring: this._useQuerystring,
|
|
3304
|
-
json: true,
|
|
3305
|
-
};
|
|
3306
|
-
|
|
3307
|
-
let authenticationPromise = Promise.resolve();
|
|
3308
|
-
if (this.authentications.token.accessToken) {
|
|
3309
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3310
|
-
this.authentications.token.applyToRequest(
|
|
3311
|
-
localVarRequestOptions
|
|
3312
|
-
)
|
|
3313
|
-
);
|
|
3314
|
-
}
|
|
3315
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3316
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3317
|
-
);
|
|
3318
|
-
|
|
3319
|
-
let interceptorPromise = authenticationPromise;
|
|
3320
|
-
for (const interceptor of this.interceptors) {
|
|
3321
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3322
|
-
interceptor(localVarRequestOptions)
|
|
3323
|
-
);
|
|
3324
|
-
}
|
|
3325
|
-
|
|
3326
|
-
return interceptorPromise.then(() => {
|
|
3327
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3328
|
-
if (localVarUseFormData) {
|
|
3329
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3330
|
-
} else {
|
|
3331
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3332
|
-
}
|
|
3333
|
-
}
|
|
3334
|
-
return new Promise<{
|
|
3335
|
-
response: http.IncomingMessage;
|
|
3336
|
-
body: ListUserGroupsFromUser200Response;
|
|
3337
|
-
}>((resolve, reject) => {
|
|
3338
|
-
localVarRequest(
|
|
3339
|
-
localVarRequestOptions,
|
|
3340
|
-
(error, response, body) => {
|
|
3341
|
-
if (error) {
|
|
3342
|
-
reject(error);
|
|
3343
|
-
} else {
|
|
3344
|
-
if (
|
|
3345
|
-
response.statusCode &&
|
|
3346
|
-
response.statusCode >= 200 &&
|
|
3347
|
-
response.statusCode <= 299
|
|
3348
|
-
) {
|
|
3349
|
-
body = ObjectSerializer.deserialize(
|
|
3350
|
-
body,
|
|
3351
|
-
'ListUserGroupsFromUser200Response'
|
|
3352
|
-
);
|
|
3353
|
-
resolve({ response: response, body: body });
|
|
3354
|
-
} else {
|
|
3355
|
-
reject(
|
|
3356
|
-
new HttpError(
|
|
3357
|
-
response,
|
|
3358
|
-
body,
|
|
3359
|
-
response.statusCode
|
|
3360
|
-
)
|
|
3361
|
-
);
|
|
3362
|
-
}
|
|
3363
|
-
}
|
|
3364
|
-
}
|
|
3365
|
-
);
|
|
3366
|
-
});
|
|
3367
|
-
});
|
|
3368
|
-
}
|
|
3369
|
-
/**
|
|
3370
|
-
* Returns all groups a user belongs to.
|
|
3371
|
-
* @summary List User Groups from User
|
|
3372
|
-
* @param userId
|
|
3373
|
-
* @param pagination Pagination for groups. This parameter exists in alpha.
|
|
3374
|
-
*/
|
|
3375
|
-
public async listUserGroupsFromUserV1(
|
|
3376
|
-
userId: string,
|
|
3377
|
-
pagination: PaginationInput,
|
|
3378
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3379
|
-
): Promise<{
|
|
3380
|
-
response: http.IncomingMessage;
|
|
3381
|
-
body: ListUserGroupsFromUser200Response;
|
|
3382
|
-
}> {
|
|
3383
|
-
const localVarPath =
|
|
3384
|
-
this.basePath +
|
|
3385
|
-
'/users/{userId}/groups'.replace(
|
|
3386
|
-
'{' + 'userId' + '}',
|
|
3387
|
-
encodeURIComponent(String(userId))
|
|
3388
|
-
);
|
|
3389
|
-
let localVarQueryParameters: any = {};
|
|
3390
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3391
|
-
{},
|
|
3392
|
-
this._defaultHeaders
|
|
3393
|
-
);
|
|
3394
|
-
const produces = [
|
|
3395
|
-
'application/vnd.segment.v1+json',
|
|
3396
|
-
'application/json',
|
|
3397
|
-
];
|
|
3398
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3399
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3400
|
-
} else {
|
|
3401
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3402
|
-
}
|
|
3403
|
-
let localVarFormParams: any = {};
|
|
3404
|
-
|
|
3405
|
-
// verify required parameter 'userId' is not null or undefined
|
|
3406
|
-
if (userId === null || userId === undefined) {
|
|
3407
|
-
throw new Error(
|
|
3408
|
-
'Required parameter userId was null or undefined when calling listUserGroupsFromUserV1.'
|
|
3409
|
-
);
|
|
3410
|
-
}
|
|
3411
|
-
|
|
3412
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3413
|
-
if (pagination === null || pagination === undefined) {
|
|
3414
|
-
throw new Error(
|
|
3415
|
-
'Required parameter pagination was null or undefined when calling listUserGroupsFromUserV1.'
|
|
3416
|
-
);
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
if (pagination !== undefined) {
|
|
3420
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3421
|
-
pagination,
|
|
3422
|
-
'PaginationInput'
|
|
3423
|
-
);
|
|
3424
|
-
}
|
|
3425
|
-
|
|
3426
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
3427
|
-
|
|
3428
|
-
let localVarUseFormData = false;
|
|
3429
|
-
|
|
3430
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
3431
|
-
method: 'GET',
|
|
3432
|
-
qs: localVarQueryParameters,
|
|
3433
|
-
headers: localVarHeaderParams,
|
|
3434
|
-
uri: localVarPath,
|
|
3435
|
-
useQuerystring: this._useQuerystring,
|
|
3436
|
-
json: true,
|
|
3437
|
-
};
|
|
3438
|
-
|
|
3439
|
-
let authenticationPromise = Promise.resolve();
|
|
3440
|
-
if (this.authentications.token.accessToken) {
|
|
3441
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3442
|
-
this.authentications.token.applyToRequest(
|
|
3443
|
-
localVarRequestOptions
|
|
3444
|
-
)
|
|
3445
|
-
);
|
|
3446
|
-
}
|
|
3447
|
-
authenticationPromise = authenticationPromise.then(() =>
|
|
3448
|
-
this.authentications.default.applyToRequest(localVarRequestOptions)
|
|
3449
|
-
);
|
|
3450
|
-
|
|
3451
|
-
let interceptorPromise = authenticationPromise;
|
|
3452
|
-
for (const interceptor of this.interceptors) {
|
|
3453
|
-
interceptorPromise = interceptorPromise.then(() =>
|
|
3454
|
-
interceptor(localVarRequestOptions)
|
|
3455
|
-
);
|
|
3456
|
-
}
|
|
3457
|
-
|
|
3458
|
-
return interceptorPromise.then(() => {
|
|
3459
|
-
if (Object.keys(localVarFormParams).length) {
|
|
3460
|
-
if (localVarUseFormData) {
|
|
3461
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
3462
|
-
} else {
|
|
3463
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
3464
|
-
}
|
|
3465
|
-
}
|
|
3466
|
-
return new Promise<{
|
|
3467
|
-
response: http.IncomingMessage;
|
|
3468
|
-
body: ListUserGroupsFromUser200Response;
|
|
3469
|
-
}>((resolve, reject) => {
|
|
3470
|
-
localVarRequest(
|
|
3471
|
-
localVarRequestOptions,
|
|
3472
|
-
(error, response, body) => {
|
|
3473
|
-
if (error) {
|
|
3474
|
-
reject(error);
|
|
3475
|
-
} else {
|
|
3476
|
-
if (
|
|
3477
|
-
response.statusCode &&
|
|
3478
|
-
response.statusCode >= 200 &&
|
|
3479
|
-
response.statusCode <= 299
|
|
3480
|
-
) {
|
|
3481
|
-
body = ObjectSerializer.deserialize(
|
|
3482
|
-
body,
|
|
3483
|
-
'ListUserGroupsFromUser200Response'
|
|
3484
|
-
);
|
|
3485
|
-
resolve({ response: response, body: body });
|
|
3486
|
-
} else {
|
|
3487
|
-
reject(
|
|
3488
|
-
new HttpError(
|
|
3489
|
-
response,
|
|
3490
|
-
body,
|
|
3491
|
-
response.statusCode
|
|
3492
|
-
)
|
|
3493
|
-
);
|
|
3494
|
-
}
|
|
3495
|
-
}
|
|
3496
|
-
}
|
|
3497
|
-
);
|
|
3498
|
-
});
|
|
3499
|
-
});
|
|
3500
|
-
}
|
|
3501
|
-
/**
|
|
3502
|
-
* Returns a list of users with access to the Workspace.
|
|
3503
|
-
* @summary List Users
|
|
3504
|
-
* @param pagination Pagination for users. This parameter exists in alpha.
|
|
3505
|
-
*/
|
|
3506
|
-
public async listUsersAlpha(
|
|
3507
|
-
pagination: PaginationInput,
|
|
3508
|
-
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3509
|
-
): Promise<{ response: http.IncomingMessage; body: ListUsers200Response }> {
|
|
3510
|
-
const localVarPath = this.basePath + '/users';
|
|
3511
|
-
let localVarQueryParameters: any = {};
|
|
3512
|
-
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3513
|
-
{},
|
|
3514
|
-
this._defaultHeaders
|
|
3515
|
-
);
|
|
3516
|
-
const produces = [
|
|
3517
|
-
'application/vnd.segment.v1alpha+json',
|
|
3518
|
-
'application/json',
|
|
3519
|
-
];
|
|
3520
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
3521
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3522
|
-
} else {
|
|
3523
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
3524
|
-
}
|
|
3525
|
-
let localVarFormParams: any = {};
|
|
3526
|
-
|
|
3527
|
-
// verify required parameter 'pagination' is not null or undefined
|
|
3528
|
-
if (pagination === null || pagination === undefined) {
|
|
3529
|
-
throw new Error(
|
|
3530
|
-
'Required parameter pagination was null or undefined when calling listUsersAlpha.'
|
|
3531
|
-
);
|
|
3532
|
-
}
|
|
3533
|
-
|
|
3534
|
-
if (pagination !== undefined) {
|
|
3535
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3536
|
-
pagination,
|
|
3537
|
-
'PaginationInput'
|
|
293
|
+
'Required parameter CreateInvitesV1Input was null or undefined when calling createInvites.'
|
|
3538
294
|
);
|
|
3539
295
|
}
|
|
3540
296
|
|
|
@@ -3543,12 +299,16 @@ export class IAMUsersApi {
|
|
|
3543
299
|
let localVarUseFormData = false;
|
|
3544
300
|
|
|
3545
301
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
3546
|
-
method: '
|
|
302
|
+
method: 'POST',
|
|
3547
303
|
qs: localVarQueryParameters,
|
|
3548
304
|
headers: localVarHeaderParams,
|
|
3549
305
|
uri: localVarPath,
|
|
3550
306
|
useQuerystring: this._useQuerystring,
|
|
3551
307
|
json: true,
|
|
308
|
+
body: ObjectSerializer.serialize(
|
|
309
|
+
CreateInvitesV1Input,
|
|
310
|
+
'CreateInvitesV1Input'
|
|
311
|
+
),
|
|
3552
312
|
};
|
|
3553
313
|
|
|
3554
314
|
let authenticationPromise = Promise.resolve();
|
|
@@ -3580,7 +340,7 @@ export class IAMUsersApi {
|
|
|
3580
340
|
}
|
|
3581
341
|
return new Promise<{
|
|
3582
342
|
response: http.IncomingMessage;
|
|
3583
|
-
body:
|
|
343
|
+
body: CreateInvites200Response;
|
|
3584
344
|
}>((resolve, reject) => {
|
|
3585
345
|
localVarRequest(
|
|
3586
346
|
localVarRequestOptions,
|
|
@@ -3595,7 +355,7 @@ export class IAMUsersApi {
|
|
|
3595
355
|
) {
|
|
3596
356
|
body = ObjectSerializer.deserialize(
|
|
3597
357
|
body,
|
|
3598
|
-
'
|
|
358
|
+
'CreateInvites200Response'
|
|
3599
359
|
);
|
|
3600
360
|
resolve({ response: response, body: body });
|
|
3601
361
|
} else {
|
|
@@ -3614,42 +374,48 @@ export class IAMUsersApi {
|
|
|
3614
374
|
});
|
|
3615
375
|
}
|
|
3616
376
|
/**
|
|
3617
|
-
*
|
|
3618
|
-
* @summary
|
|
3619
|
-
* @param
|
|
377
|
+
* Removes a list of invitations to join a Workspace. When called, this endpoint may generate one or more of the following [audit trail](/tag/Audit-Trail) events: * Invite Deleted * Group Memberships Deleted The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
378
|
+
* @summary Delete Invites
|
|
379
|
+
* @param emails The list of emails to delete invites for. This parameter exists in v1.
|
|
3620
380
|
*/
|
|
3621
|
-
public async
|
|
3622
|
-
|
|
381
|
+
public async deleteInvites(
|
|
382
|
+
emails: Array<string>,
|
|
3623
383
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3624
|
-
): Promise<{
|
|
3625
|
-
|
|
384
|
+
): Promise<{
|
|
385
|
+
response: http.IncomingMessage;
|
|
386
|
+
body: DeleteInvites200Response;
|
|
387
|
+
}> {
|
|
388
|
+
const localVarPath = this.basePath + '/invites';
|
|
3626
389
|
let localVarQueryParameters: any = {};
|
|
3627
390
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3628
391
|
{},
|
|
3629
392
|
this._defaultHeaders
|
|
3630
393
|
);
|
|
3631
394
|
const produces = [
|
|
3632
|
-
'application/vnd.segment.
|
|
395
|
+
'application/vnd.segment.v1+json',
|
|
3633
396
|
'application/json',
|
|
397
|
+
'application/vnd.segment.v1beta+json',
|
|
398
|
+
'application/vnd.segment.v1alpha+json',
|
|
3634
399
|
];
|
|
400
|
+
// give precedence to 'application/json'
|
|
3635
401
|
if (produces.indexOf('application/json') >= 0) {
|
|
3636
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3637
|
-
} else {
|
|
3638
402
|
localVarHeaderParams.Accept = 'application/json';
|
|
403
|
+
} else {
|
|
404
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3639
405
|
}
|
|
3640
406
|
let localVarFormParams: any = {};
|
|
3641
407
|
|
|
3642
|
-
// verify required parameter '
|
|
3643
|
-
if (
|
|
408
|
+
// verify required parameter 'emails' is not null or undefined
|
|
409
|
+
if (emails === null || emails === undefined) {
|
|
3644
410
|
throw new Error(
|
|
3645
|
-
'Required parameter
|
|
411
|
+
'Required parameter emails was null or undefined when calling deleteInvites.'
|
|
3646
412
|
);
|
|
3647
413
|
}
|
|
3648
414
|
|
|
3649
|
-
if (
|
|
3650
|
-
localVarQueryParameters['
|
|
3651
|
-
|
|
3652
|
-
'
|
|
415
|
+
if (emails !== undefined) {
|
|
416
|
+
localVarQueryParameters['emails'] = ObjectSerializer.serialize(
|
|
417
|
+
emails,
|
|
418
|
+
'Array<string>'
|
|
3653
419
|
);
|
|
3654
420
|
}
|
|
3655
421
|
|
|
@@ -3658,7 +424,7 @@ export class IAMUsersApi {
|
|
|
3658
424
|
let localVarUseFormData = false;
|
|
3659
425
|
|
|
3660
426
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
3661
|
-
method: '
|
|
427
|
+
method: 'DELETE',
|
|
3662
428
|
qs: localVarQueryParameters,
|
|
3663
429
|
headers: localVarHeaderParams,
|
|
3664
430
|
uri: localVarPath,
|
|
@@ -3695,7 +461,7 @@ export class IAMUsersApi {
|
|
|
3695
461
|
}
|
|
3696
462
|
return new Promise<{
|
|
3697
463
|
response: http.IncomingMessage;
|
|
3698
|
-
body:
|
|
464
|
+
body: DeleteInvites200Response;
|
|
3699
465
|
}>((resolve, reject) => {
|
|
3700
466
|
localVarRequest(
|
|
3701
467
|
localVarRequestOptions,
|
|
@@ -3710,7 +476,7 @@ export class IAMUsersApi {
|
|
|
3710
476
|
) {
|
|
3711
477
|
body = ObjectSerializer.deserialize(
|
|
3712
478
|
body,
|
|
3713
|
-
'
|
|
479
|
+
'DeleteInvites200Response'
|
|
3714
480
|
);
|
|
3715
481
|
resolve({ response: response, body: body });
|
|
3716
482
|
} else {
|
|
@@ -3729,39 +495,48 @@ export class IAMUsersApi {
|
|
|
3729
495
|
});
|
|
3730
496
|
}
|
|
3731
497
|
/**
|
|
3732
|
-
*
|
|
3733
|
-
* @summary
|
|
3734
|
-
* @param
|
|
498
|
+
* Removes one or multiple users. When called, this endpoint may generate the `Group Memberships Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
499
|
+
* @summary Delete Users
|
|
500
|
+
* @param userIds The ids of the users to remove. This parameter exists in v1.
|
|
3735
501
|
*/
|
|
3736
|
-
public async
|
|
3737
|
-
|
|
502
|
+
public async deleteUsers(
|
|
503
|
+
userIds: Array<string>,
|
|
3738
504
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3739
|
-
): Promise<{
|
|
505
|
+
): Promise<{
|
|
506
|
+
response: http.IncomingMessage;
|
|
507
|
+
body: DeleteUsers200Response;
|
|
508
|
+
}> {
|
|
3740
509
|
const localVarPath = this.basePath + '/users';
|
|
3741
510
|
let localVarQueryParameters: any = {};
|
|
3742
511
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3743
512
|
{},
|
|
3744
513
|
this._defaultHeaders
|
|
3745
514
|
);
|
|
3746
|
-
const produces = [
|
|
515
|
+
const produces = [
|
|
516
|
+
'application/vnd.segment.v1+json',
|
|
517
|
+
'application/json',
|
|
518
|
+
'application/vnd.segment.v1beta+json',
|
|
519
|
+
'application/vnd.segment.v1alpha+json',
|
|
520
|
+
];
|
|
521
|
+
// give precedence to 'application/json'
|
|
3747
522
|
if (produces.indexOf('application/json') >= 0) {
|
|
3748
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3749
|
-
} else {
|
|
3750
523
|
localVarHeaderParams.Accept = 'application/json';
|
|
524
|
+
} else {
|
|
525
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3751
526
|
}
|
|
3752
527
|
let localVarFormParams: any = {};
|
|
3753
528
|
|
|
3754
|
-
// verify required parameter '
|
|
3755
|
-
if (
|
|
529
|
+
// verify required parameter 'userIds' is not null or undefined
|
|
530
|
+
if (userIds === null || userIds === undefined) {
|
|
3756
531
|
throw new Error(
|
|
3757
|
-
'Required parameter
|
|
532
|
+
'Required parameter userIds was null or undefined when calling deleteUsers.'
|
|
3758
533
|
);
|
|
3759
534
|
}
|
|
3760
535
|
|
|
3761
|
-
if (
|
|
3762
|
-
localVarQueryParameters['
|
|
3763
|
-
|
|
3764
|
-
'
|
|
536
|
+
if (userIds !== undefined) {
|
|
537
|
+
localVarQueryParameters['userIds'] = ObjectSerializer.serialize(
|
|
538
|
+
userIds,
|
|
539
|
+
'Array<string>'
|
|
3765
540
|
);
|
|
3766
541
|
}
|
|
3767
542
|
|
|
@@ -3770,7 +545,7 @@ export class IAMUsersApi {
|
|
|
3770
545
|
let localVarUseFormData = false;
|
|
3771
546
|
|
|
3772
547
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
3773
|
-
method: '
|
|
548
|
+
method: 'DELETE',
|
|
3774
549
|
qs: localVarQueryParameters,
|
|
3775
550
|
headers: localVarHeaderParams,
|
|
3776
551
|
uri: localVarPath,
|
|
@@ -3807,7 +582,7 @@ export class IAMUsersApi {
|
|
|
3807
582
|
}
|
|
3808
583
|
return new Promise<{
|
|
3809
584
|
response: http.IncomingMessage;
|
|
3810
|
-
body:
|
|
585
|
+
body: DeleteUsers200Response;
|
|
3811
586
|
}>((resolve, reject) => {
|
|
3812
587
|
localVarRequest(
|
|
3813
588
|
localVarRequestOptions,
|
|
@@ -3822,7 +597,7 @@ export class IAMUsersApi {
|
|
|
3822
597
|
) {
|
|
3823
598
|
body = ObjectSerializer.deserialize(
|
|
3824
599
|
body,
|
|
3825
|
-
'
|
|
600
|
+
'DeleteUsers200Response'
|
|
3826
601
|
);
|
|
3827
602
|
resolve({ response: response, body: body });
|
|
3828
603
|
} else {
|
|
@@ -3841,15 +616,20 @@ export class IAMUsersApi {
|
|
|
3841
616
|
});
|
|
3842
617
|
}
|
|
3843
618
|
/**
|
|
3844
|
-
* Returns a
|
|
3845
|
-
* @summary
|
|
3846
|
-
* @param
|
|
619
|
+
* Returns a user given their id.
|
|
620
|
+
* @summary Get User
|
|
621
|
+
* @param userId
|
|
3847
622
|
*/
|
|
3848
|
-
public async
|
|
3849
|
-
|
|
623
|
+
public async getUser(
|
|
624
|
+
userId: string,
|
|
3850
625
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3851
|
-
): Promise<{ response: http.IncomingMessage; body:
|
|
3852
|
-
const localVarPath =
|
|
626
|
+
): Promise<{ response: http.IncomingMessage; body: GetUser200Response }> {
|
|
627
|
+
const localVarPath =
|
|
628
|
+
this.basePath +
|
|
629
|
+
'/users/{userId}'.replace(
|
|
630
|
+
'{' + 'userId' + '}',
|
|
631
|
+
encodeURIComponent(String(userId))
|
|
632
|
+
);
|
|
3853
633
|
let localVarQueryParameters: any = {};
|
|
3854
634
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3855
635
|
{},
|
|
@@ -3858,25 +638,21 @@ export class IAMUsersApi {
|
|
|
3858
638
|
const produces = [
|
|
3859
639
|
'application/vnd.segment.v1+json',
|
|
3860
640
|
'application/json',
|
|
641
|
+
'application/vnd.segment.v1beta+json',
|
|
642
|
+
'application/vnd.segment.v1alpha+json',
|
|
3861
643
|
];
|
|
644
|
+
// give precedence to 'application/json'
|
|
3862
645
|
if (produces.indexOf('application/json') >= 0) {
|
|
3863
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3864
|
-
} else {
|
|
3865
646
|
localVarHeaderParams.Accept = 'application/json';
|
|
647
|
+
} else {
|
|
648
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3866
649
|
}
|
|
3867
650
|
let localVarFormParams: any = {};
|
|
3868
651
|
|
|
3869
|
-
// verify required parameter '
|
|
3870
|
-
if (
|
|
652
|
+
// verify required parameter 'userId' is not null or undefined
|
|
653
|
+
if (userId === null || userId === undefined) {
|
|
3871
654
|
throw new Error(
|
|
3872
|
-
'Required parameter
|
|
3873
|
-
);
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
|
-
if (pagination !== undefined) {
|
|
3877
|
-
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
3878
|
-
pagination,
|
|
3879
|
-
'PaginationInput'
|
|
655
|
+
'Required parameter userId was null or undefined when calling getUser.'
|
|
3880
656
|
);
|
|
3881
657
|
}
|
|
3882
658
|
|
|
@@ -3922,7 +698,7 @@ export class IAMUsersApi {
|
|
|
3922
698
|
}
|
|
3923
699
|
return new Promise<{
|
|
3924
700
|
response: http.IncomingMessage;
|
|
3925
|
-
body:
|
|
701
|
+
body: GetUser200Response;
|
|
3926
702
|
}>((resolve, reject) => {
|
|
3927
703
|
localVarRequest(
|
|
3928
704
|
localVarRequestOptions,
|
|
@@ -3937,7 +713,7 @@ export class IAMUsersApi {
|
|
|
3937
713
|
) {
|
|
3938
714
|
body = ObjectSerializer.deserialize(
|
|
3939
715
|
body,
|
|
3940
|
-
'
|
|
716
|
+
'GetUser200Response'
|
|
3941
717
|
);
|
|
3942
718
|
resolve({ response: response, body: body });
|
|
3943
719
|
} else {
|
|
@@ -3956,55 +732,48 @@ export class IAMUsersApi {
|
|
|
3956
732
|
});
|
|
3957
733
|
}
|
|
3958
734
|
/**
|
|
3959
|
-
*
|
|
3960
|
-
* @summary
|
|
3961
|
-
* @param
|
|
3962
|
-
* @param ReplacePermissionsForUserV1Input
|
|
735
|
+
* Returns a list of invitations to join a Workspace. Config API omitted fields: - `parent`
|
|
736
|
+
* @summary List Invites
|
|
737
|
+
* @param pagination Defines the pagination parameters. This parameter exists in v1.
|
|
3963
738
|
*/
|
|
3964
|
-
public async
|
|
3965
|
-
|
|
3966
|
-
ReplacePermissionsForUserV1Input: ReplacePermissionsForUserV1Input,
|
|
739
|
+
public async listInvites(
|
|
740
|
+
pagination: PaginationInput,
|
|
3967
741
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
3968
742
|
): Promise<{
|
|
3969
743
|
response: http.IncomingMessage;
|
|
3970
|
-
body:
|
|
744
|
+
body: ListInvites200Response;
|
|
3971
745
|
}> {
|
|
3972
|
-
const localVarPath =
|
|
3973
|
-
this.basePath +
|
|
3974
|
-
'/users/{userId}/permissions'.replace(
|
|
3975
|
-
'{' + 'userId' + '}',
|
|
3976
|
-
encodeURIComponent(String(userId))
|
|
3977
|
-
);
|
|
746
|
+
const localVarPath = this.basePath + '/invites';
|
|
3978
747
|
let localVarQueryParameters: any = {};
|
|
3979
748
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
3980
749
|
{},
|
|
3981
750
|
this._defaultHeaders
|
|
3982
751
|
);
|
|
3983
752
|
const produces = [
|
|
3984
|
-
'application/vnd.segment.
|
|
753
|
+
'application/vnd.segment.v1+json',
|
|
3985
754
|
'application/json',
|
|
755
|
+
'application/vnd.segment.v1beta+json',
|
|
756
|
+
'application/vnd.segment.v1alpha+json',
|
|
3986
757
|
];
|
|
758
|
+
// give precedence to 'application/json'
|
|
3987
759
|
if (produces.indexOf('application/json') >= 0) {
|
|
3988
|
-
localVarHeaderParams.Accept = produces[0];
|
|
3989
|
-
} else {
|
|
3990
760
|
localVarHeaderParams.Accept = 'application/json';
|
|
761
|
+
} else {
|
|
762
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
3991
763
|
}
|
|
3992
764
|
let localVarFormParams: any = {};
|
|
3993
765
|
|
|
3994
|
-
// verify required parameter '
|
|
3995
|
-
if (
|
|
766
|
+
// verify required parameter 'pagination' is not null or undefined
|
|
767
|
+
if (pagination === null || pagination === undefined) {
|
|
3996
768
|
throw new Error(
|
|
3997
|
-
'Required parameter
|
|
769
|
+
'Required parameter pagination was null or undefined when calling listInvites.'
|
|
3998
770
|
);
|
|
3999
771
|
}
|
|
4000
772
|
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
) {
|
|
4006
|
-
throw new Error(
|
|
4007
|
-
'Required parameter ReplacePermissionsForUserV1Input was null or undefined when calling replacePermissionsForUserAlpha.'
|
|
773
|
+
if (pagination !== undefined) {
|
|
774
|
+
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
775
|
+
pagination,
|
|
776
|
+
'PaginationInput'
|
|
4008
777
|
);
|
|
4009
778
|
}
|
|
4010
779
|
|
|
@@ -4013,16 +782,12 @@ export class IAMUsersApi {
|
|
|
4013
782
|
let localVarUseFormData = false;
|
|
4014
783
|
|
|
4015
784
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4016
|
-
method: '
|
|
785
|
+
method: 'GET',
|
|
4017
786
|
qs: localVarQueryParameters,
|
|
4018
787
|
headers: localVarHeaderParams,
|
|
4019
788
|
uri: localVarPath,
|
|
4020
789
|
useQuerystring: this._useQuerystring,
|
|
4021
790
|
json: true,
|
|
4022
|
-
body: ObjectSerializer.serialize(
|
|
4023
|
-
ReplacePermissionsForUserV1Input,
|
|
4024
|
-
'ReplacePermissionsForUserV1Input'
|
|
4025
|
-
),
|
|
4026
791
|
};
|
|
4027
792
|
|
|
4028
793
|
let authenticationPromise = Promise.resolve();
|
|
@@ -4054,7 +819,7 @@ export class IAMUsersApi {
|
|
|
4054
819
|
}
|
|
4055
820
|
return new Promise<{
|
|
4056
821
|
response: http.IncomingMessage;
|
|
4057
|
-
body:
|
|
822
|
+
body: ListInvites200Response;
|
|
4058
823
|
}>((resolve, reject) => {
|
|
4059
824
|
localVarRequest(
|
|
4060
825
|
localVarRequestOptions,
|
|
@@ -4069,7 +834,7 @@ export class IAMUsersApi {
|
|
|
4069
834
|
) {
|
|
4070
835
|
body = ObjectSerializer.deserialize(
|
|
4071
836
|
body,
|
|
4072
|
-
'
|
|
837
|
+
'ListInvites200Response'
|
|
4073
838
|
);
|
|
4074
839
|
resolve({ response: response, body: body });
|
|
4075
840
|
} else {
|
|
@@ -4088,22 +853,22 @@ export class IAMUsersApi {
|
|
|
4088
853
|
});
|
|
4089
854
|
}
|
|
4090
855
|
/**
|
|
4091
|
-
*
|
|
4092
|
-
* @summary
|
|
856
|
+
* Returns all groups a user belongs to.
|
|
857
|
+
* @summary List User Groups from User
|
|
4093
858
|
* @param userId
|
|
4094
|
-
* @param
|
|
859
|
+
* @param pagination Pagination for groups. This parameter exists in v1.
|
|
4095
860
|
*/
|
|
4096
|
-
public async
|
|
861
|
+
public async listUserGroupsFromUser(
|
|
4097
862
|
userId: string,
|
|
4098
|
-
|
|
863
|
+
pagination: PaginationInput,
|
|
4099
864
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4100
865
|
): Promise<{
|
|
4101
866
|
response: http.IncomingMessage;
|
|
4102
|
-
body:
|
|
867
|
+
body: ListUserGroupsFromUser200Response;
|
|
4103
868
|
}> {
|
|
4104
869
|
const localVarPath =
|
|
4105
870
|
this.basePath +
|
|
4106
|
-
'/users/{userId}/
|
|
871
|
+
'/users/{userId}/groups'.replace(
|
|
4107
872
|
'{' + 'userId' + '}',
|
|
4108
873
|
encodeURIComponent(String(userId))
|
|
4109
874
|
);
|
|
@@ -4113,30 +878,37 @@ export class IAMUsersApi {
|
|
|
4113
878
|
this._defaultHeaders
|
|
4114
879
|
);
|
|
4115
880
|
const produces = [
|
|
4116
|
-
'application/vnd.segment.
|
|
881
|
+
'application/vnd.segment.v1+json',
|
|
4117
882
|
'application/json',
|
|
883
|
+
'application/vnd.segment.v1beta+json',
|
|
884
|
+
'application/vnd.segment.v1alpha+json',
|
|
4118
885
|
];
|
|
886
|
+
// give precedence to 'application/json'
|
|
4119
887
|
if (produces.indexOf('application/json') >= 0) {
|
|
4120
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4121
|
-
} else {
|
|
4122
888
|
localVarHeaderParams.Accept = 'application/json';
|
|
889
|
+
} else {
|
|
890
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4123
891
|
}
|
|
4124
892
|
let localVarFormParams: any = {};
|
|
4125
893
|
|
|
4126
894
|
// verify required parameter 'userId' is not null or undefined
|
|
4127
895
|
if (userId === null || userId === undefined) {
|
|
4128
896
|
throw new Error(
|
|
4129
|
-
'Required parameter userId was null or undefined when calling
|
|
897
|
+
'Required parameter userId was null or undefined when calling listUserGroupsFromUser.'
|
|
4130
898
|
);
|
|
4131
899
|
}
|
|
4132
900
|
|
|
4133
|
-
// verify required parameter '
|
|
4134
|
-
if (
|
|
4135
|
-
ReplacePermissionsForUserV1Input === null ||
|
|
4136
|
-
ReplacePermissionsForUserV1Input === undefined
|
|
4137
|
-
) {
|
|
901
|
+
// verify required parameter 'pagination' is not null or undefined
|
|
902
|
+
if (pagination === null || pagination === undefined) {
|
|
4138
903
|
throw new Error(
|
|
4139
|
-
'Required parameter
|
|
904
|
+
'Required parameter pagination was null or undefined when calling listUserGroupsFromUser.'
|
|
905
|
+
);
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
if (pagination !== undefined) {
|
|
909
|
+
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
910
|
+
pagination,
|
|
911
|
+
'PaginationInput'
|
|
4140
912
|
);
|
|
4141
913
|
}
|
|
4142
914
|
|
|
@@ -4145,16 +917,12 @@ export class IAMUsersApi {
|
|
|
4145
917
|
let localVarUseFormData = false;
|
|
4146
918
|
|
|
4147
919
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4148
|
-
method: '
|
|
920
|
+
method: 'GET',
|
|
4149
921
|
qs: localVarQueryParameters,
|
|
4150
922
|
headers: localVarHeaderParams,
|
|
4151
923
|
uri: localVarPath,
|
|
4152
924
|
useQuerystring: this._useQuerystring,
|
|
4153
925
|
json: true,
|
|
4154
|
-
body: ObjectSerializer.serialize(
|
|
4155
|
-
ReplacePermissionsForUserV1Input,
|
|
4156
|
-
'ReplacePermissionsForUserV1Input'
|
|
4157
|
-
),
|
|
4158
926
|
};
|
|
4159
927
|
|
|
4160
928
|
let authenticationPromise = Promise.resolve();
|
|
@@ -4186,7 +954,7 @@ export class IAMUsersApi {
|
|
|
4186
954
|
}
|
|
4187
955
|
return new Promise<{
|
|
4188
956
|
response: http.IncomingMessage;
|
|
4189
|
-
body:
|
|
957
|
+
body: ListUserGroupsFromUser200Response;
|
|
4190
958
|
}>((resolve, reject) => {
|
|
4191
959
|
localVarRequest(
|
|
4192
960
|
localVarRequestOptions,
|
|
@@ -4201,7 +969,7 @@ export class IAMUsersApi {
|
|
|
4201
969
|
) {
|
|
4202
970
|
body = ObjectSerializer.deserialize(
|
|
4203
971
|
body,
|
|
4204
|
-
'
|
|
972
|
+
'ListUserGroupsFromUser200Response'
|
|
4205
973
|
);
|
|
4206
974
|
resolve({ response: response, body: body });
|
|
4207
975
|
} else {
|
|
@@ -4220,25 +988,15 @@ export class IAMUsersApi {
|
|
|
4220
988
|
});
|
|
4221
989
|
}
|
|
4222
990
|
/**
|
|
4223
|
-
*
|
|
4224
|
-
* @summary
|
|
4225
|
-
* @param
|
|
4226
|
-
* @param ReplacePermissionsForUserV1Input
|
|
991
|
+
* Returns a list of users with access to the Workspace.
|
|
992
|
+
* @summary List Users
|
|
993
|
+
* @param pagination Pagination for users. This parameter exists in v1.
|
|
4227
994
|
*/
|
|
4228
|
-
public async
|
|
4229
|
-
|
|
4230
|
-
ReplacePermissionsForUserV1Input: ReplacePermissionsForUserV1Input,
|
|
995
|
+
public async listUsers(
|
|
996
|
+
pagination: PaginationInput,
|
|
4231
997
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
4232
|
-
): Promise<{
|
|
4233
|
-
|
|
4234
|
-
body: ReplacePermissionsForUser200Response;
|
|
4235
|
-
}> {
|
|
4236
|
-
const localVarPath =
|
|
4237
|
-
this.basePath +
|
|
4238
|
-
'/users/{userId}/permissions'.replace(
|
|
4239
|
-
'{' + 'userId' + '}',
|
|
4240
|
-
encodeURIComponent(String(userId))
|
|
4241
|
-
);
|
|
998
|
+
): Promise<{ response: http.IncomingMessage; body: ListUsers200Response }> {
|
|
999
|
+
const localVarPath = this.basePath + '/users';
|
|
4242
1000
|
let localVarQueryParameters: any = {};
|
|
4243
1001
|
let localVarHeaderParams: any = (<any>Object).assign(
|
|
4244
1002
|
{},
|
|
@@ -4247,28 +1005,28 @@ export class IAMUsersApi {
|
|
|
4247
1005
|
const produces = [
|
|
4248
1006
|
'application/vnd.segment.v1+json',
|
|
4249
1007
|
'application/json',
|
|
1008
|
+
'application/vnd.segment.v1beta+json',
|
|
1009
|
+
'application/vnd.segment.v1alpha+json',
|
|
4250
1010
|
];
|
|
1011
|
+
// give precedence to 'application/json'
|
|
4251
1012
|
if (produces.indexOf('application/json') >= 0) {
|
|
4252
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4253
|
-
} else {
|
|
4254
1013
|
localVarHeaderParams.Accept = 'application/json';
|
|
1014
|
+
} else {
|
|
1015
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4255
1016
|
}
|
|
4256
1017
|
let localVarFormParams: any = {};
|
|
4257
1018
|
|
|
4258
|
-
// verify required parameter '
|
|
4259
|
-
if (
|
|
1019
|
+
// verify required parameter 'pagination' is not null or undefined
|
|
1020
|
+
if (pagination === null || pagination === undefined) {
|
|
4260
1021
|
throw new Error(
|
|
4261
|
-
'Required parameter
|
|
1022
|
+
'Required parameter pagination was null or undefined when calling listUsers.'
|
|
4262
1023
|
);
|
|
4263
1024
|
}
|
|
4264
1025
|
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
) {
|
|
4270
|
-
throw new Error(
|
|
4271
|
-
'Required parameter ReplacePermissionsForUserV1Input was null or undefined when calling replacePermissionsForUserCurrent.'
|
|
1026
|
+
if (pagination !== undefined) {
|
|
1027
|
+
localVarQueryParameters['pagination'] = ObjectSerializer.serialize(
|
|
1028
|
+
pagination,
|
|
1029
|
+
'PaginationInput'
|
|
4272
1030
|
);
|
|
4273
1031
|
}
|
|
4274
1032
|
|
|
@@ -4277,16 +1035,12 @@ export class IAMUsersApi {
|
|
|
4277
1035
|
let localVarUseFormData = false;
|
|
4278
1036
|
|
|
4279
1037
|
let localVarRequestOptions: localVarRequest.Options = {
|
|
4280
|
-
method: '
|
|
1038
|
+
method: 'GET',
|
|
4281
1039
|
qs: localVarQueryParameters,
|
|
4282
1040
|
headers: localVarHeaderParams,
|
|
4283
1041
|
uri: localVarPath,
|
|
4284
1042
|
useQuerystring: this._useQuerystring,
|
|
4285
1043
|
json: true,
|
|
4286
|
-
body: ObjectSerializer.serialize(
|
|
4287
|
-
ReplacePermissionsForUserV1Input,
|
|
4288
|
-
'ReplacePermissionsForUserV1Input'
|
|
4289
|
-
),
|
|
4290
1044
|
};
|
|
4291
1045
|
|
|
4292
1046
|
let authenticationPromise = Promise.resolve();
|
|
@@ -4318,7 +1072,7 @@ export class IAMUsersApi {
|
|
|
4318
1072
|
}
|
|
4319
1073
|
return new Promise<{
|
|
4320
1074
|
response: http.IncomingMessage;
|
|
4321
|
-
body:
|
|
1075
|
+
body: ListUsers200Response;
|
|
4322
1076
|
}>((resolve, reject) => {
|
|
4323
1077
|
localVarRequest(
|
|
4324
1078
|
localVarRequestOptions,
|
|
@@ -4333,7 +1087,7 @@ export class IAMUsersApi {
|
|
|
4333
1087
|
) {
|
|
4334
1088
|
body = ObjectSerializer.deserialize(
|
|
4335
1089
|
body,
|
|
4336
|
-
'
|
|
1090
|
+
'ListUsers200Response'
|
|
4337
1091
|
);
|
|
4338
1092
|
resolve({ response: response, body: body });
|
|
4339
1093
|
} else {
|
|
@@ -4352,12 +1106,12 @@ export class IAMUsersApi {
|
|
|
4352
1106
|
});
|
|
4353
1107
|
}
|
|
4354
1108
|
/**
|
|
4355
|
-
* Updates the list of access permissions for a user. When called, this endpoint may generate the `Policy Deleted` [
|
|
1109
|
+
* Updates the list of access permissions for a user. When called, this endpoint may generate the `Policy Deleted` event in the [audit trail](/tag/Audit-Trail). The rate limit for this endpoint is 60 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.
|
|
4356
1110
|
* @summary Replace Permissions for User
|
|
4357
1111
|
* @param userId
|
|
4358
1112
|
* @param ReplacePermissionsForUserV1Input
|
|
4359
1113
|
*/
|
|
4360
|
-
public async
|
|
1114
|
+
public async replacePermissionsForUser(
|
|
4361
1115
|
userId: string,
|
|
4362
1116
|
ReplacePermissionsForUserV1Input: ReplacePermissionsForUserV1Input,
|
|
4363
1117
|
options: { headers: { [name: string]: string } } = { headers: {} }
|
|
@@ -4379,18 +1133,21 @@ export class IAMUsersApi {
|
|
|
4379
1133
|
const produces = [
|
|
4380
1134
|
'application/vnd.segment.v1+json',
|
|
4381
1135
|
'application/json',
|
|
1136
|
+
'application/vnd.segment.v1beta+json',
|
|
1137
|
+
'application/vnd.segment.v1alpha+json',
|
|
4382
1138
|
];
|
|
1139
|
+
// give precedence to 'application/json'
|
|
4383
1140
|
if (produces.indexOf('application/json') >= 0) {
|
|
4384
|
-
localVarHeaderParams.Accept = produces[0];
|
|
4385
|
-
} else {
|
|
4386
1141
|
localVarHeaderParams.Accept = 'application/json';
|
|
1142
|
+
} else {
|
|
1143
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
4387
1144
|
}
|
|
4388
1145
|
let localVarFormParams: any = {};
|
|
4389
1146
|
|
|
4390
1147
|
// verify required parameter 'userId' is not null or undefined
|
|
4391
1148
|
if (userId === null || userId === undefined) {
|
|
4392
1149
|
throw new Error(
|
|
4393
|
-
'Required parameter userId was null or undefined when calling
|
|
1150
|
+
'Required parameter userId was null or undefined when calling replacePermissionsForUser.'
|
|
4394
1151
|
);
|
|
4395
1152
|
}
|
|
4396
1153
|
|
|
@@ -4400,7 +1157,7 @@ export class IAMUsersApi {
|
|
|
4400
1157
|
ReplacePermissionsForUserV1Input === undefined
|
|
4401
1158
|
) {
|
|
4402
1159
|
throw new Error(
|
|
4403
|
-
'Required parameter ReplacePermissionsForUserV1Input was null or undefined when calling
|
|
1160
|
+
'Required parameter ReplacePermissionsForUserV1Input was null or undefined when calling replacePermissionsForUser.'
|
|
4404
1161
|
);
|
|
4405
1162
|
}
|
|
4406
1163
|
|