Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/__tests__/AnalyticsApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
shareAssetEventSchema,
viewAssetEventSchema,
} from '__models__/analytics-responses.zod'
import { AnalyticsApi } from 'apis'
import AcquiaDAM from 'index'
import { AnalyticsApi } from 'apis/analytics/api'
import { ApiClient } from 'client'

let client: AnalyticsApi

Expand All @@ -19,7 +19,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).analytics
client = new AnalyticsApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets Analytics: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/AssetsApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {
listIntegrationLinksResultSchema,
listFileFormatsResultSchema,
} from '__models__/assets-responses.zod'
import { AssetsApi } from 'apis'
import AcquiaDAM from 'index'
import { AssetsApi } from 'apis/assets/api'
import { ApiClient } from 'client'

let client: AssetsApi

Expand All @@ -27,7 +27,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).assets
client = new AssetsApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/AttributesApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
listAttributesResultSchema,
listAttributeVocabularyResultSchema,
} from '__models__/attributes-responses.zod'
import { AttributesApi } from 'apis'
import AcquiaDAM from 'index'
import { AttributesApi } from 'apis/attributes/api'
import { ApiClient } from 'client'

let client: AttributesApi

Expand All @@ -16,7 +16,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).attributes
client = new AttributesApi(new ApiClient(process.env.API_TOKEN))
})

describe('Product Attributes: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/CategoriesApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
createEditCategoryResultSchema,
listCategoriesResultSchema,
} from '__models__/categories-responses.zod'
import { CategoriesApi } from 'apis'
import AcquiaDAM from 'index'
import { CategoriesApi } from 'apis/categories/api'
import { ApiClient } from 'client'

let client: CategoriesApi

Expand All @@ -17,7 +17,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).categories
client = new CategoriesApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets Categories: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/CollectionApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
createCollectionResultSchema,
listCollectionsResultSchema,
} from '__models__/collections-responses.zod'
import { CollectionsApi } from 'apis'
import AcquiaDAM from 'index'
import { CollectionsApi } from 'apis/collections/api'
import { ApiClient } from 'client'

let client: CollectionsApi

Expand All @@ -15,7 +15,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).collections
client = new CollectionsApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets Collections: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/MetadataApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
listMetadataTypesResultSchema,
listViewableMetadataFieldsResultSchema,
} from '__models__/metadata-responses.zod'
import { MetadataApi } from 'apis'
import AcquiaDAM from 'index'
import { MetadataApi } from 'apis/metadata/api'
import { ApiClient } from 'client'

let client: MetadataApi

Expand All @@ -17,7 +17,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).metadata
client = new MetadataApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets Metadata: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/OrdersApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
listOrderProfileResultSchema,
getOrderDetailsResultSchema,
} from '__models__/orders-responses.zod'
import { OrdersApi } from 'apis'
import AcquiaDAM from 'index'
import { OrdersApi } from 'apis/orders/api'
import { ApiClient } from 'client'

let client: OrdersApi

Expand All @@ -19,7 +19,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).orders
client = new OrdersApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets Orders: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/ProductsApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
productSchema,
searchProductsResultSchema,
} from '__models__/products-responses.zod'
import { ProductsApi } from 'apis'
import AcquiaDAM from 'index'
import { ProductsApi } from 'apis/products/api'
import { ApiClient } from 'client'

let client: ProductsApi

Expand All @@ -20,7 +20,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).products
client = new ProductsApi(new ApiClient(process.env.API_TOKEN))
})

describe('Products: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/SearchConnectorApi.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, it, describe, beforeAll, jest } from '@jest/globals'
import { getSearchConnectorResultSchema } from '__models__/search-connector-responses.zod'
import { SearchConnectorApi } from 'apis'
import AcquiaDAM from 'index'
import { SearchConnectorApi } from 'apis/search-connector/api'
import { ApiClient } from 'client'

let client: SearchConnectorApi

Expand All @@ -12,7 +12,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).searchConnector
client = new SearchConnectorApi(new ApiClient(process.env.API_TOKEN))
})

describe('Get Search Connector Url: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/UsageApi.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect, it, describe, beforeAll, jest } from '@jest/globals'
import { getUsageResultSchema } from '__models__/usage-responses.zod'
import { UsageApi } from 'apis'
import AcquiaDAM from 'index'
import { UsageApi } from 'apis/usage/api'
import { ApiClient } from 'client'

let client: UsageApi

Expand All @@ -12,7 +12,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).usage
client = new UsageApi(new ApiClient(process.env.API_TOKEN))
})

describe('Get Usage: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/UsersApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import {
getContactResultSchema,
getUserResultSchema,
} from '__models__/users-responses.zod'
import { UsersApi } from 'apis'
import AcquiaDAM from 'index'
import { UsersApi } from 'apis/users/api'
import { ApiClient } from 'client'

let client: UsersApi

Expand All @@ -15,7 +15,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).users
client = new UsersApi(new ApiClient(process.env.API_TOKEN))
})

describe('Users: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/WebhooksApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
listAssetsWebhooksResultSchema,
listWorkflowWebhooksResultSchema,
} from '__models__/webhooks-responses.zod'
import { WebhooksApi } from 'apis'
import AcquiaDAM from 'index'
import { WebhooksApi } from 'apis/webhooks/api'
import { ApiClient } from 'client'

let client: WebhooksApi

Expand All @@ -18,7 +18,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).webhooks
client = new WebhooksApi(new ApiClient(process.env.API_TOKEN))
})

describe('Assets Webhooks: ', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/WorkflowApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
supportingFileSchema,
uploadProofResultSchema,
} from '__models__/workflow-responses.zod'
import { WorkflowApi } from 'apis'
import AcquiaDAM from 'index'
import { WorkflowApi } from 'apis/workflow/api'
import { ApiClient } from 'client'

let client: WorkflowApi

Expand All @@ -20,7 +20,7 @@ beforeAll(() => {
throw new Error('API_TOKEN environment variable not set')
}

client = new AcquiaDAM({ accessToken: process.env.API_TOKEN }).workflow
client = new WorkflowApi(new ApiClient(process.env.API_TOKEN))
})

describe('Workflow Projects: ', () => {
Expand Down
Loading