( org: string, projectName: string, deployID: number, authToken: string, ipfsCID: string, queryVersion: string, query: QueryAdvancedOpts, chains: V3DeploymentIndexerType[], url: string )
| 134 | } |
| 135 | |
| 136 | export async function updateDeployment( |
| 137 | org: string, |
| 138 | projectName: string, |
| 139 | deployID: number, |
| 140 | authToken: string, |
| 141 | ipfsCID: string, |
| 142 | queryVersion: string, |
| 143 | query: QueryAdvancedOpts, |
| 144 | chains: V3DeploymentIndexerType[], |
| 145 | url: string |
| 146 | ): Promise<void> { |
| 147 | try { |
| 148 | await getAxiosInstance(url, authToken).put( |
| 149 | `v3/subqueries/${buildProjectKey(org, projectName)}/deployments/${deployID}`, |
| 150 | { |
| 151 | cid: ipfsCID, |
| 152 | queryImageVersion: queryVersion, |
| 153 | queryAdvancedSettings: {query}, |
| 154 | chains, |
| 155 | } as V3DeploymentInput |
| 156 | ); |
| 157 | } catch (e) { |
| 158 | throw errorHandle(e, `Failed to redeploy project: ${(e as any).message}`); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | export async function ipfsCID_validate( |
| 163 | cid: string | undefined, |
no test coverage detected