From 9c0611d2ee2a11e97955d2d7746a7b6412067fc7 Mon Sep 17 00:00:00 2001 From: tyler-mairose-sp Date: Wed, 1 Nov 2023 14:50:57 -0400 Subject: [PATCH] Update SDK with prescript to simplify the search document schema --- .github/workflows/build_pr.yaml | 5 + .github/workflows/bump_version.yaml | 5 + PSSailpoint/PSSailpoint.psd1 | 3 +- PSSailpoint/beta/docs/AccountUsage.md | 2 +- .../NonEmployeeRequestWithoutApprovalItem.md | 4 +- ...EmployeeRequestWithoutApprovalItemAllOf.md | 4 +- PSSailpoint/beta/docs/SourceUsage.md | 2 +- PSSailpoint/v3/.openapi-generator/FILES | 3 - PSSailpoint/v3/README.md | 1 - PSSailpoint/v3/docs/AccountUsage.md | 2 +- PSSailpoint/v3/docs/AggregationResult.md | 2 +- .../NonEmployeeRequestWithoutApprovalItem.md | 4 +- ...EmployeeRequestWithoutApprovalItemAllOf.md | 4 +- PSSailpoint/v3/docs/SearchApi.md | 8 +- PSSailpoint/v3/docs/SearchDocument.md | 179 ------------------ PSSailpoint/v3/docs/SourceUsage.md | 2 +- .../v3/src/PSSailpoint/Api/SearchApi.ps1 | 11 +- .../src/PSSailpoint/Model/SearchDocument.ps1 | 178 ----------------- .../v3/tests/Model/SearchDocument.Tests.ps1 | 17 -- sdk-resources/prescript.js | 51 +++++ 20 files changed, 83 insertions(+), 404 deletions(-) delete mode 100644 PSSailpoint/v3/docs/SearchDocument.md delete mode 100644 PSSailpoint/v3/src/PSSailpoint/Model/SearchDocument.ps1 delete mode 100644 PSSailpoint/v3/tests/Model/SearchDocument.Tests.ps1 create mode 100644 sdk-resources/prescript.js diff --git a/.github/workflows/build_pr.yaml b/.github/workflows/build_pr.yaml index ebe05a7ed..043c992c1 100644 --- a/.github/workflows/build_pr.yaml +++ b/.github/workflows/build_pr.yaml @@ -33,6 +33,11 @@ jobs: with: node-version: "16" + - name: Run Prescript + id: prescript + run: | + node sdk-resources/prescript.js api-specs/idn + - name: Build V3 SDK id: buildV3 run: | diff --git a/.github/workflows/bump_version.yaml b/.github/workflows/bump_version.yaml index ad248b05a..e0734e75c 100644 --- a/.github/workflows/bump_version.yaml +++ b/.github/workflows/bump_version.yaml @@ -35,6 +35,11 @@ jobs: with: node-version: "16" + - name: Run Prescript + id: prescript + run: | + node sdk-resources/prescript.js api-specs/idn + # Install yq for working with yaml files - name: Set up yq uses: frenck/action-setup-yq@v1 diff --git a/PSSailpoint/PSSailpoint.psd1 b/PSSailpoint/PSSailpoint.psd1 index 2498aca73..346de3086 100644 --- a/PSSailpoint/PSSailpoint.psd1 +++ b/PSSailpoint/PSSailpoint.psd1 @@ -3,7 +3,7 @@ # # Generated by: Sailpoint Developer Relations # -# Generated on: 11/01/2023 +# Generated on: 11/1/2023 # @{ @@ -738,7 +738,6 @@ FunctionsToExport = 'New-AccessProfile', 'Remove-AccessProfile', 'Initialize-SearchArguments', 'ConvertFrom-JsonToSearchArguments', 'Initialize-SearchArgumentsOwner', 'ConvertFrom-JsonToSearchArgumentsOwner', - 'ConvertFrom-JsonToSearchDocument', 'Initialize-SearchIdentityReference', 'ConvertFrom-JsonToSearchIdentityReference', 'Initialize-SearchIdentityReferenceAllOf', diff --git a/PSSailpoint/beta/docs/AccountUsage.md b/PSSailpoint/beta/docs/AccountUsage.md index 415f1b982..4ce327561 100644 --- a/PSSailpoint/beta/docs/AccountUsage.md +++ b/PSSailpoint/beta/docs/AccountUsage.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes - Prepare the resource ```powershell -$AccountUsage = Initialize-PSSailpointBetaAccountUsage -Date Fri Apr 21 00:00:00 UTC 2023 ` +$AccountUsage = Initialize-PSSailpointBetaAccountUsage -Date Thu Apr 20 20:00:00 EDT 2023 ` -Count 10 ``` diff --git a/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItem.md b/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItem.md index 8e9317990..15d94c3cd 100644 --- a/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItem.md +++ b/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItem.md @@ -38,8 +38,8 @@ $NonEmployeeRequestWithoutApprovalItem = Initialize-PSSailpointBetaNonEmployeeRe -ApprovalStatus null ` -Comment null ` -CompletionDate 2020-03-24T11:11:41.139-05:00 ` - -StartDate Tue Mar 24 00:00:00 UTC 2020 ` - -EndDate Thu Mar 25 00:00:00 UTC 2021 ` + -StartDate Mon Mar 23 20:00:00 EDT 2020 ` + -EndDate Wed Mar 24 20:00:00 EDT 2021 ` -Modified 2020-03-24T11:11:41.139-05:00 ` -Created 2020-03-24T11:11:41.139-05:00 ``` diff --git a/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md b/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md index 508b3bf8e..1de0d8680 100644 --- a/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md +++ b/PSSailpoint/beta/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md @@ -34,8 +34,8 @@ $NonEmployeeRequestWithoutApprovalItemAllOf = Initialize-PSSailpointBetaNonEmplo -ApprovalStatus null ` -Comment null ` -CompletionDate 2020-03-24T11:11:41.139-05:00 ` - -StartDate Tue Mar 24 00:00:00 UTC 2020 ` - -EndDate Thu Mar 25 00:00:00 UTC 2021 ` + -StartDate Mon Mar 23 20:00:00 EDT 2020 ` + -EndDate Wed Mar 24 20:00:00 EDT 2021 ` -Modified 2020-03-24T11:11:41.139-05:00 ` -Created 2020-03-24T11:11:41.139-05:00 ``` diff --git a/PSSailpoint/beta/docs/SourceUsage.md b/PSSailpoint/beta/docs/SourceUsage.md index f6fa4eea3..a342dc212 100644 --- a/PSSailpoint/beta/docs/SourceUsage.md +++ b/PSSailpoint/beta/docs/SourceUsage.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes - Prepare the resource ```powershell -$SourceUsage = Initialize-PSSailpointBetaSourceUsage -Date Fri Apr 21 00:00:00 UTC 2023 ` +$SourceUsage = Initialize-PSSailpointBetaSourceUsage -Date Thu Apr 20 20:00:00 EDT 2023 ` -Count 10.45 ``` diff --git a/PSSailpoint/v3/.openapi-generator/FILES b/PSSailpoint/v3/.openapi-generator/FILES index b07d5498e..197902b71 100644 --- a/PSSailpoint/v3/.openapi-generator/FILES +++ b/PSSailpoint/v3/.openapi-generator/FILES @@ -430,7 +430,6 @@ docs/SearchAggregationSpecificationAllOf.md docs/SearchApi.md docs/SearchArguments.md docs/SearchArgumentsOwner.md -docs/SearchDocument.md docs/SearchFilterType.md docs/SearchIdentityReference.md docs/SearchIdentityReferenceAllOf.md @@ -952,7 +951,6 @@ src/PSSailpoint/Model/SearchAggregationSpecification.ps1 src/PSSailpoint/Model/SearchAggregationSpecificationAllOf.ps1 src/PSSailpoint/Model/SearchArguments.ps1 src/PSSailpoint/Model/SearchArgumentsOwner.ps1 -src/PSSailpoint/Model/SearchDocument.ps1 src/PSSailpoint/Model/SearchFilterType.ps1 src/PSSailpoint/Model/SearchIdentityReference.ps1 src/PSSailpoint/Model/SearchIdentityReferenceAllOf.ps1 @@ -1473,7 +1471,6 @@ tests/Model/SearchAggregationSpecification.Tests.ps1 tests/Model/SearchAggregationSpecificationAllOf.Tests.ps1 tests/Model/SearchArguments.Tests.ps1 tests/Model/SearchArgumentsOwner.Tests.ps1 -tests/Model/SearchDocument.Tests.ps1 tests/Model/SearchFilterType.Tests.ps1 tests/Model/SearchIdentityReference.Tests.ps1 tests/Model/SearchIdentityReferenceAllOf.Tests.ps1 diff --git a/PSSailpoint/v3/README.md b/PSSailpoint/v3/README.md index 66ab1fae2..2a616523e 100644 --- a/PSSailpoint/v3/README.md +++ b/PSSailpoint/v3/README.md @@ -714,7 +714,6 @@ Class | Method | HTTP request | Description - [PSSailpoint/Model.SearchAggregationSpecificationAllOf](docs/SearchAggregationSpecificationAllOf.md) - [PSSailpoint/Model.SearchArguments](docs/SearchArguments.md) - [PSSailpoint/Model.SearchArgumentsOwner](docs/SearchArgumentsOwner.md) - - [PSSailpoint/Model.SearchDocument](docs/SearchDocument.md) - [PSSailpoint/Model.SearchFilterType](docs/SearchFilterType.md) - [PSSailpoint/Model.SearchIdentityReference](docs/SearchIdentityReference.md) - [PSSailpoint/Model.SearchIdentityReferenceAllOf](docs/SearchIdentityReferenceAllOf.md) diff --git a/PSSailpoint/v3/docs/AccountUsage.md b/PSSailpoint/v3/docs/AccountUsage.md index 8d046b85a..3c09b6fe2 100644 --- a/PSSailpoint/v3/docs/AccountUsage.md +++ b/PSSailpoint/v3/docs/AccountUsage.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes - Prepare the resource ```powershell -$AccountUsage = Initialize-PSSailpointAccountUsage -Date Fri Apr 21 00:00:00 UTC 2023 ` +$AccountUsage = Initialize-PSSailpointAccountUsage -Date Thu Apr 20 20:00:00 EDT 2023 ` -Count 10 ``` diff --git a/PSSailpoint/v3/docs/AggregationResult.md b/PSSailpoint/v3/docs/AggregationResult.md index b0da47825..2f8b7a91d 100644 --- a/PSSailpoint/v3/docs/AggregationResult.md +++ b/PSSailpoint/v3/docs/AggregationResult.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Aggregations** | [**SystemCollectionsHashtable**](.md) | The document containing the results of the aggregation. This document is controlled by Elasticsearch and depends on the type of aggregation query that is run. See Elasticsearch [Aggregations](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/search-aggregations.html) documentation for information. | [optional] -**Hits** | [**SearchDocument[]**](SearchDocument.md) | The results of the aggregation search query. | [optional] +**Hits** | [**SystemCollectionsHashtable[]**](SystemCollectionsHashtable.md) | The results of the aggregation search query. | [optional] ## Examples diff --git a/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItem.md b/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItem.md index 2177f5d72..dfba90661 100644 --- a/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItem.md +++ b/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItem.md @@ -38,8 +38,8 @@ $NonEmployeeRequestWithoutApprovalItem = Initialize-PSSailpointNonEmployeeReques -ApprovalStatus null ` -Comment approved ` -CompletionDate 2020-03-24T11:11:41.139-05:00 ` - -StartDate Tue Mar 24 00:00:00 UTC 2020 ` - -EndDate Thu Mar 25 00:00:00 UTC 2021 ` + -StartDate Mon Mar 23 20:00:00 EDT 2020 ` + -EndDate Wed Mar 24 20:00:00 EDT 2021 ` -Modified 2020-03-24T11:11:41.139-05:00 ` -Created 2020-03-24T11:11:41.139-05:00 ``` diff --git a/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md b/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md index 51d767020..a885817e4 100644 --- a/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md +++ b/PSSailpoint/v3/docs/NonEmployeeRequestWithoutApprovalItemAllOf.md @@ -34,8 +34,8 @@ $NonEmployeeRequestWithoutApprovalItemAllOf = Initialize-PSSailpointNonEmployeeR -ApprovalStatus null ` -Comment approved ` -CompletionDate 2020-03-24T11:11:41.139-05:00 ` - -StartDate Tue Mar 24 00:00:00 UTC 2020 ` - -EndDate Thu Mar 25 00:00:00 UTC 2021 ` + -StartDate Mon Mar 23 20:00:00 EDT 2020 ` + -EndDate Wed Mar 24 20:00:00 EDT 2021 ` -Modified 2020-03-24T11:11:41.139-05:00 ` -Created 2020-03-24T11:11:41.139-05:00 ``` diff --git a/PSSailpoint/v3/docs/SearchApi.md b/PSSailpoint/v3/docs/SearchApi.md index d2187e04a..3cf198b83 100644 --- a/PSSailpoint/v3/docs/SearchApi.md +++ b/PSSailpoint/v3/docs/SearchApi.md @@ -169,7 +169,7 @@ void (empty response body) # **Search-Get** -> SearchDocument Search-Get
+> SystemCollectionsHashtable Search-Get
>         [-Index]
>         [-Id]
@@ -208,7 +208,7 @@ Name | Type | Description | Notes ### Return type -[**SearchDocument**](SearchDocument.md) (PSCustomObject) +[**SystemCollectionsHashtable**](SystemCollectionsHashtable.md) (PSCustomObject) ### Authorization @@ -223,7 +223,7 @@ Name | Type | Description | Notes # **Search-Post** -> SearchDocument[] Search-Post
+> SystemCollectionsHashtable[] Search-Post
>         [-Search]
>         [-Offset]
>         [-Limit]
@@ -291,7 +291,7 @@ Name | Type | Description | Notes ### Return type -[**SearchDocument[]**](SearchDocument.md) (PSCustomObject) +[**SystemCollectionsHashtable[]**](SystemCollectionsHashtable.md) (PSCustomObject) ### Authorization diff --git a/PSSailpoint/v3/docs/SearchDocument.md b/PSSailpoint/v3/docs/SearchDocument.md deleted file mode 100644 index 64f8cb09f..000000000 --- a/PSSailpoint/v3/docs/SearchDocument.md +++ /dev/null @@ -1,179 +0,0 @@ -# SearchDocument -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **String** | The unique ID of the referenced object. | -**Name** | **String** | The human readable name of the referenced object. | -**Type** | [**DocumentType**](DocumentType.md) | | -**Description** | **String** | The description of the access item | [optional] -**Created** | **System.DateTime** | A date-time in ISO-8601 format | [optional] -**Modified** | **System.DateTime** | A date-time in ISO-8601 format | [optional] -**Synced** | **System.DateTime** | A date-time in ISO-8601 format | [optional] -**Enabled** | **Boolean** | | [optional] -**Requestable** | **Boolean** | Indicates if the access can be requested | [optional] -**RequestCommentsRequired** | **Boolean** | Indicates if comments are required when requesting access | [optional] -**Owner** | [**Owner**](Owner.md) | | [optional] -**Source** | [**Reference1**](Reference1.md) | | [optional] -**Entitlements** | [**BaseEntitlement[]**](BaseEntitlement.md) | | [optional] -**EntitlementCount** | **Int32** | The number of entitlements assigned to the identity | [optional] -**Tags** | **String[]** | | [optional] -**Action** | **String** | The action that was performed | [optional] -**Stage** | **String** | The current stage of the activity | [optional] -**Origin** | **String** | | [optional] -**Status** | **String** | The identity's status in SailPoint | [optional] -**Requester** | [**AccountSource**](AccountSource.md) | | [optional] -**Recipient** | [**AccountSource**](AccountSource.md) | | [optional] -**TrackingNumber** | **String** | | [optional] -**Errors** | **String[]** | | [optional] -**Warnings** | **String[]** | | [optional] -**Approvals** | [**Approval[]**](Approval.md) | | [optional] -**OriginalRequests** | [**OriginalRequest[]**](OriginalRequest.md) | | [optional] -**ExpansionItems** | [**ExpansionItem[]**](ExpansionItem.md) | | [optional] -**AccountRequests** | [**AccountRequest[]**](AccountRequest.md) | | [optional] -**Sources** | **String** | | [optional] -**AccountId** | **String** | The ID of the account | [optional] -**Disabled** | **Boolean** | Indicates if the account is disabled | [optional] -**Locked** | **Boolean** | Indicates if the account is locked | [optional] -**Privileged** | **Boolean** | | [optional] -**ManuallyCorrelated** | **Boolean** | Indicates if the account has been manually correlated to an identity | [optional] -**PasswordLastSet** | **System.DateTime** | A date-time in ISO-8601 format | [optional] -**EntitlementAttributes** | [**System.Collections.Hashtable**](AnyType.md) | a map or dictionary of key/value pairs | [optional] -**Attributes** | [**System.Collections.Hashtable**](AnyType.md) | a map or dictionary of key/value pairs | [optional] -**Identity** | [**DisplayReference**](DisplayReference.md) | | [optional] -**Access** | [**IdentityAccess[]**](IdentityAccess.md) | The list of access items assigned to the identity | [optional] -**Uncorrelated** | **Boolean** | Indicates if the account is not correlated to an identity | [optional] -**Duration** | **Int32** | | [optional] -**AvgDuration** | **Int32** | | [optional] -**ChangedAccounts** | **Int32** | | [optional] -**NextScheduled** | **System.DateTime** | A date-time in ISO-8601 format | [optional] -**StartTime** | **System.DateTime** | A date-time in ISO-8601 format | [optional] -**SourceOwner** | **String** | John Doe | [optional] -**Attribute** | **String** | The name of the entitlement attribute | [optional] -**Value** | **String** | The value of the entitlement | [optional] -**DisplayName** | **String** | The display name of the identity | [optional] -**IdentityCount** | **Int32** | | [optional] -**Type** | **String** | The type of event | [optional] -**Actor** | [**NameType**](NameType.md) | | [optional] -**Target** | [**NameType**](NameType.md) | | [optional] -**Stack** | **String** | | [optional] -**IpAddress** | **String** | | [optional] -**Details** | **String** | | [optional] -**Objects** | **String[]** | | [optional] -**Operation** | **String** | | [optional] -**TechnicalName** | **String** | | [optional] -**FirstName** | **String** | The first name of the identity | [optional] -**LastName** | **String** | The last name of the identity | [optional] -**Email** | **String** | The identity's primary email address | [optional] -**Phone** | **String** | The phone number of the identity | [optional] -**Inactive** | **Boolean** | Indicates if the identity is inactive | [optional] -**Protected** | **Boolean** | | [optional] -**EmployeeNumber** | **String** | | [optional] -**Manager** | [**DisplayReference**](DisplayReference.md) | | [optional] -**IsManager** | **Boolean** | Indicates if this identity is a manager of other identities | [optional] -**IdentityProfile** | [**Reference1**](Reference1.md) | | [optional] -**ProcessingState** | **String** | | [optional] -**ProcessingDetails** | [**ProcessingDetails**](ProcessingDetails.md) | | [optional] -**Accounts** | [**BaseAccount[]**](BaseAccount.md) | List of accounts associated with the identity | [optional] -**AccountCount** | **Int32** | Number of accounts associated with the identity | [optional] -**Apps** | [**App[]**](App.md) | The list of applications the identity has access to | [optional] -**AppCount** | **Int32** | The number of applications the identity has access to | [optional] -**AccessCount** | **Int32** | The number of access items assigned to the identity | [optional] -**AccessProfileCount** | **Int32** | | [optional] -**RoleCount** | **Int32** | The number of roles assigned to the identity | [optional] -**Owns** | [**Owns**](Owns.md) | | [optional] -**AccessProfiles** | [**Reference1[]**](Reference1.md) | | [optional] - -## Examples - -- Prepare the resource -```powershell -$SearchDocument = Initialize-PSSailpointSearchDocument -Id 2c91808568c529c60168cca6f90c1313 ` - -Name John Doe ` - -Type null ` - -Description The admin role ` - -Created 2018-06-25T20:22:28.104Z ` - -Modified 2018-06-25T20:22:28.104Z ` - -Synced 2018-06-25T20:22:28.104Z ` - -Enabled true ` - -Requestable true ` - -RequestCommentsRequired false ` - -Owner null ` - -Source null ` - -Entitlements null ` - -EntitlementCount 10 ` - -Tags [TAG_1, TAG_2] ` - -Action update ` - -Stage Completed ` - -Origin null ` - -Status UNREGISTERED ` - -Requester null ` - -Recipient null ` - -TrackingNumber 63f891e0735f4cc8bf1968144a1e7440 ` - -Errors null ` - -Warnings null ` - -Approvals null ` - -OriginalRequests null ` - -ExpansionItems null ` - -AccountRequests null ` - -Sources smartsheet-test, airtable-v4, IdentityNow ` - -AccountId john.doe ` - -Disabled false ` - -Locked false ` - -Privileged false ` - -ManuallyCorrelated false ` - -PasswordLastSet 2018-06-25T20:22:28.104Z ` - -EntitlementAttributes {moderator=true, admin=true, trust_level=4} ` - -Attributes {country=US, firstname=Carol, cloudStatus=UNREGISTERED} ` - -Identity null ` - -Access null ` - -Uncorrelated false ` - -Duration 20 ` - -AvgDuration 20 ` - -ChangedAccounts 1 ` - -NextScheduled 2018-06-25T20:22:28.104Z ` - -StartTime 2018-06-25T20:22:28.104Z ` - -SourceOwner null ` - -Attribute admin ` - -Value true ` - -DisplayName Carol.Adams ` - -IdentityCount 3 ` - -Type SYSTEM_CONFIG ` - -Actor null ` - -Target null ` - -Stack tpe ` - -IpAddress 52.52.97.85 ` - -Details 73b65dfbed1842548c207432a18c84b0 ` - -Objects null ` - -Operation REQUEST ` - -TechnicalName AUTHENTICATION_REQUEST_PASSED ` - -FirstName Carol ` - -LastName Adams ` - -Email Carol.Adams@sailpointdemo.com ` - -Phone +1 440-527-3672 ` - -Inactive false ` - -Protected false ` - -EmployeeNumber 1a2a3d4e ` - -Manager null ` - -IsManager false ` - -IdentityProfile null ` - -ProcessingState null ` - -ProcessingDetails null ` - -Accounts null ` - -AccountCount 3 ` - -Apps null ` - -AppCount 2 ` - -AccessCount 5 ` - -AccessProfileCount null ` - -RoleCount 1 ` - -Owns null ` - -AccessProfiles null -``` - -- Convert the resource to JSON -```powershell -$SearchDocument | ConvertTo-JSON -``` - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - diff --git a/PSSailpoint/v3/docs/SourceUsage.md b/PSSailpoint/v3/docs/SourceUsage.md index d4f5abd1a..0a45aa9ff 100644 --- a/PSSailpoint/v3/docs/SourceUsage.md +++ b/PSSailpoint/v3/docs/SourceUsage.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes - Prepare the resource ```powershell -$SourceUsage = Initialize-PSSailpointSourceUsage -Date Fri Apr 21 00:00:00 UTC 2023 ` +$SourceUsage = Initialize-PSSailpointSourceUsage -Date Thu Apr 20 20:00:00 EDT 2023 ` -Count 10.45 ``` diff --git a/PSSailpoint/v3/src/PSSailpoint/Api/SearchApi.ps1 b/PSSailpoint/v3/src/PSSailpoint/Api/SearchApi.ps1 index c95b21f06..6a9ec6102 100644 --- a/PSSailpoint/v3/src/PSSailpoint/Api/SearchApi.ps1 +++ b/PSSailpoint/v3/src/PSSailpoint/Api/SearchApi.ps1 @@ -248,7 +248,7 @@ A switch when turned on will return a hash table of Response, StatusCode and Hea .OUTPUTS -SearchDocument +SystemCollectionsHashtable #> function Search-Get { [CmdletBinding()] @@ -300,12 +300,9 @@ function Search-Get { -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` - -ReturnType "SearchDocument" ` + -ReturnType "SystemCollectionsHashtable" ` -IsBodyNullable $false - # process oneOf response - $LocalVarResult["Response"] = ConvertFrom-JsonToSearchDocument (ConvertTo-Json $LocalVarResult["Response"] -Depth 100) - if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { @@ -341,7 +338,7 @@ A switch when turned on will return a hash table of Response, StatusCode and Hea .OUTPUTS -SearchDocument[] +SystemCollectionsHashtable[] #> function Search-Post { [CmdletBinding()] @@ -423,7 +420,7 @@ function Search-Post { -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` - -ReturnType "SearchDocument[]" ` + -ReturnType "SystemCollectionsHashtable[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { diff --git a/PSSailpoint/v3/src/PSSailpoint/Model/SearchDocument.ps1 b/PSSailpoint/v3/src/PSSailpoint/Model/SearchDocument.ps1 deleted file mode 100644 index 5a917de12..000000000 --- a/PSSailpoint/v3/src/PSSailpoint/Model/SearchDocument.ps1 +++ /dev/null @@ -1,178 +0,0 @@ -# -# IdentityNow V3 API -# Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. -# Version: 3.0.0 -# Generated by OpenAPI Generator: https://openapi-generator.tech -# - -<# -.SYNOPSIS - -No summary available. - -.DESCRIPTION - -No description available. - -.PARAMETER Json - -JSON object - -.OUTPUTS - -SearchDocument -#> -function ConvertFrom-JsonToSearchDocument { - [CmdletBinding()] - Param ( - [AllowEmptyString()] - [string]$Json - ) - - Process { - $match = 0 - $matchType = $null - $matchInstance = $null - - # try to match AccessProfileDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToAccessProfileDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "AccessProfileDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'AccessProfileDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match AccountActivityDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToAccountActivityDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "AccountActivityDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'AccountActivityDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match AccountDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToAccountDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "AccountDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'AccountDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match AggregationDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToAggregationDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "AggregationDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'AggregationDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match EntitlementDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToEntitlementDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "EntitlementDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'EntitlementDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match EventDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToEventDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "EventDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'EventDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match IdentityDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToIdentityDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "IdentityDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'IdentityDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - # try to match RoleDocument defined in the oneOf schemas - try { - $matchInstance = ConvertFrom-JsonToRoleDocument $Json - - foreach($property in $matchInstance.PsObject.Properties) { - if ($null -ne $property.Value) { - $matchType = "RoleDocument" - $match++ - break - } - } - } catch { - # fail to match the schema defined in oneOf, proceed to the next one - Write-Debug "Failed to match 'RoleDocument' defined in oneOf (SearchDocument). Proceeding to the next one if any." - } - - if ($match -gt 1) { - throw "Error! The JSON payload matches more than one type defined in oneOf schemas ([AccessProfileDocument, AccountActivityDocument, AccountDocument, AggregationDocument, EntitlementDocument, EventDocument, IdentityDocument, RoleDocument]). JSON Payload: $($Json)" - } elseif ($match -eq 1) { - return [PSCustomObject]@{ - "ActualType" = ${matchType} - "ActualInstance" = ${matchInstance} - "OneOfSchemas" = @("AccessProfileDocument", "AccountActivityDocument", "AccountDocument", "AggregationDocument", "EntitlementDocument", "EventDocument", "IdentityDocument", "RoleDocument") - } - } else { - throw "Error! The JSON payload doesn't matches any type defined in oneOf schemas ([AccessProfileDocument, AccountActivityDocument, AccountDocument, AggregationDocument, EntitlementDocument, EventDocument, IdentityDocument, RoleDocument]). JSON Payload: $($Json)" - } - } -} - diff --git a/PSSailpoint/v3/tests/Model/SearchDocument.Tests.ps1 b/PSSailpoint/v3/tests/Model/SearchDocument.Tests.ps1 deleted file mode 100644 index e19a4fdc9..000000000 --- a/PSSailpoint/v3/tests/Model/SearchDocument.Tests.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -# -# IdentityNow V3 API -# Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. -# Version: 3.0.0 -# Generated by OpenAPI Generator: https://openapi-generator.tech -# - -Describe -tag 'PSSailpoint' -name 'SearchDocument' { - Context 'SearchDocument' { - It 'Initialize-SearchDocument' { - # a simple test to create an object - #$NewObject = Initialize-SearchDocument -Id "TEST_VALUE" -Name "TEST_VALUE" -Type "TEST_VALUE" -Description "TEST_VALUE" -Created "TEST_VALUE" -Modified "TEST_VALUE" -Synced "TEST_VALUE" -Enabled "TEST_VALUE" -Requestable "TEST_VALUE" -RequestCommentsRequired "TEST_VALUE" -Owner "TEST_VALUE" -Source "TEST_VALUE" -Entitlements "TEST_VALUE" -EntitlementCount "TEST_VALUE" -Tags "TEST_VALUE" -Action "TEST_VALUE" -Stage "TEST_VALUE" -Origin "TEST_VALUE" -Status "TEST_VALUE" -Requester "TEST_VALUE" -Recipient "TEST_VALUE" -TrackingNumber "TEST_VALUE" -Errors "TEST_VALUE" -Warnings "TEST_VALUE" -Approvals "TEST_VALUE" -OriginalRequests "TEST_VALUE" -ExpansionItems "TEST_VALUE" -AccountRequests "TEST_VALUE" -Sources "TEST_VALUE" -AccountId "TEST_VALUE" -Disabled "TEST_VALUE" -Locked "TEST_VALUE" -Privileged "TEST_VALUE" -ManuallyCorrelated "TEST_VALUE" -PasswordLastSet "TEST_VALUE" -EntitlementAttributes "TEST_VALUE" -Attributes "TEST_VALUE" -Identity "TEST_VALUE" -Access "TEST_VALUE" -Uncorrelated "TEST_VALUE" -Duration "TEST_VALUE" -AvgDuration "TEST_VALUE" -ChangedAccounts "TEST_VALUE" -NextScheduled "TEST_VALUE" -StartTime "TEST_VALUE" -SourceOwner "TEST_VALUE" -Attribute "TEST_VALUE" -Value "TEST_VALUE" -DisplayName "TEST_VALUE" -IdentityCount "TEST_VALUE" -Type "TEST_VALUE" -Actor "TEST_VALUE" -Target "TEST_VALUE" -Stack "TEST_VALUE" -IpAddress "TEST_VALUE" -Details "TEST_VALUE" -Objects "TEST_VALUE" -Operation "TEST_VALUE" -TechnicalName "TEST_VALUE" -FirstName "TEST_VALUE" -LastName "TEST_VALUE" -Email "TEST_VALUE" -Phone "TEST_VALUE" -Inactive "TEST_VALUE" -Protected "TEST_VALUE" -EmployeeNumber "TEST_VALUE" -Manager "TEST_VALUE" -IsManager "TEST_VALUE" -IdentityProfile "TEST_VALUE" -ProcessingState "TEST_VALUE" -ProcessingDetails "TEST_VALUE" -Accounts "TEST_VALUE" -AccountCount "TEST_VALUE" -Apps "TEST_VALUE" -AppCount "TEST_VALUE" -AccessCount "TEST_VALUE" -AccessProfileCount "TEST_VALUE" -RoleCount "TEST_VALUE" -Owns "TEST_VALUE" -AccessProfiles "TEST_VALUE" - #$NewObject | Should -BeOfType SearchDocument - #$NewObject.property | Should -Be 0 - } - } -} diff --git a/sdk-resources/prescript.js b/sdk-resources/prescript.js new file mode 100644 index 000000000..905ce788c --- /dev/null +++ b/sdk-resources/prescript.js @@ -0,0 +1,51 @@ +const fs = require("fs"); +const path = require("path"); +const getAllFiles = function (dirPath, arrayOfFiles) { + files = fs.readdirSync(dirPath); + arrayOfFiles = arrayOfFiles || []; + files.forEach(function (file) { + if (fs.statSync(dirPath + "/" + file).isDirectory()) { + arrayOfFiles = getAllFiles(dirPath + "/" + file, arrayOfFiles); + } else { + arrayOfFiles.push(path.join(__dirname.replaceAll('sdk-resources',''), dirPath, "/", file)); + } + }); + return arrayOfFiles; +}; + + +const fixFiles = function (myArray) { + let fixCheck = 0; + for (const file of myArray) { + let fileOut = []; + let madeChange = false; + let rawdata = fs.readFileSync(file).toString(); + let rawDataArra = rawdata.split("\n"); + + // remove the complex search scema + if (file.includes(path.join("documents", "SearchDocument.yaml"))) { + fileOut.push("type: object"); + rawDataArra = fileOut.slice(); + fileOut = []; + madeChange = true; + } + + + + + + if (madeChange) { + fixCheck += 1; + fs.writeFileSync(file, rawDataArra.join("\n")); + } + } + console.log(`fixed ${fixCheck} files`) +} + + + + +let myArray = []; +getAllFiles(process.argv[2], myArray); + +fixFiles(myArray) \ No newline at end of file