|
1 | 1 | import { hashV0, hashV1 } from '@dcl/hashing'
|
2 | 2 | import { Entity } from '@dcl/schemas'
|
3 |
| -import { IFetchComponent, RequestOptions as OriginalRequestOptions } from '@well-known-components/interfaces' |
| 3 | +import { IFetchComponent, RequestOptions } from '@well-known-components/interfaces' |
4 | 4 | import FormData from 'form-data'
|
5 | 5 | import { ClientOptions, DeploymentData } from './types'
|
6 | 6 | import { addModelToFormData, isNode, mergeRequestOptions, sanitizeUrl, splitAndFetch } from './utils/Helper'
|
7 | 7 | import { retry } from './utils/retry'
|
8 | 8 | import { Response } from '@well-known-components/interfaces/dist/components/fetcher'
|
9 | 9 |
|
10 |
| -export type RequestOptions = OriginalRequestOptions & { |
| 10 | +export type DeploymentRequestOptions = RequestOptions & { |
11 | 11 | deploymentProtocolVersion?: 'v1' | 'v2'
|
12 | 12 | }
|
13 | 13 |
|
@@ -37,7 +37,7 @@ export type ContentClient = {
|
37 | 37 | /**
|
38 | 38 | * Deploys an entity to the content server.
|
39 | 39 | */
|
40 |
| - deploy(deployData: DeploymentData, options?: RequestOptions): Promise<unknown> |
| 40 | + deploy(deployData: DeploymentData, options?: DeploymentRequestOptions): Promise<unknown> |
41 | 41 | }
|
42 | 42 |
|
43 | 43 | export async function downloadContent(
|
@@ -142,7 +142,7 @@ export function createContentClient(options: ClientOptions): ContentClient {
|
142 | 142 | return requests
|
143 | 143 | }
|
144 | 144 |
|
145 |
| - async function deploy(deployData: DeploymentData, options?: RequestOptions): Promise<unknown> { |
| 145 | + async function deploy(deployData: DeploymentData, options?: DeploymentRequestOptions): Promise<unknown> { |
146 | 146 | if (options?.deploymentProtocolVersion === 'v2') {
|
147 | 147 | const supportsV2 = await supportsDeploymentsV2(contentUrl)
|
148 | 148 | if (supportsV2) {
|
|
0 commit comments