type Jira = {
username: string;
password: string;
domain: string;
};
/**
* Get workflow transition rule configurations
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect app.
*/
export async function main(
auth: Jira,
Atlassian_Transfer_Id: string,
body: {
expand?: string;
ruleIds: string[];
workflowEntityId: string;
[k: string]: unknown;
}
) {
const url = new URL(
`https://${auth.domain}.atlassian.net/rest/atlassian-connect/1/migration/workflow/rule/search`
);
const response = await fetch(url, {
method: "POST",
headers: {
"Atlassian-Transfer-Id": Atlassian_Transfer_Id,
"Content-Type": "application/json",
Authorization: "Basic " + btoa(`${auth.username}:${auth.password}`),
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 396 days ago
type Jira = {
username: string;
password: string;
domain: string;
};
/**
* Get workflow transition rule configurations
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect app.
*/
export async function main(
auth: Jira,
Atlassian_Transfer_Id: string,
body: {
expand?: string;
ruleIds: string[];
workflowEntityId: string;
[k: string]: unknown;
}
) {
const url = new URL(
`https://${auth.domain}.atlassian.net/rest/atlassian-connect/1/migration/workflow/rule/search`
);
const response = await fetch(url, {
method: "POST",
headers: {
"Atlassian-Transfer-Id": Atlassian_Transfer_Id,
"Content-Type": "application/json",
Authorization: "Basic " + btoa(`${auth.username}:${auth.password}`),
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 823 days ago
type Jira = {
username: string;
password: string;
domain: string;
};
/**
* Get workflow transition rule configurations
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect app.
*/
export async function main(
auth: Jira,
Atlassian_Transfer_Id: string,
body: {
expand?: string;
ruleIds:
| [string]
| [string, string]
| [string, string, string]
| [string, string, string, string]
| [string, string, string, string, string]
| [string, string, string, string, string, string]
| [string, string, string, string, string, string, string]
| [string, string, string, string, string, string, string, string]
| [string, string, string, string, string, string, string, string, string]
| [
string,
string,
string,
string,
string,
string,
string,
string,
string,
string
];
workflowEntityId: string;
[k: string]: unknown;
}
) {
const url = new URL(
`https://${auth.domain}.atlassian.net/rest/atlassian-connect/1/migration/workflow/rule/search`
);
const response = await fetch(url, {
method: "POST",
headers: {
"Atlassian-Transfer-Id": Atlassian_Transfer_Id,
"Content-Type": "application/json",
Authorization: "Basic " + btoa(`${auth.username}:${auth.password}`),
},
body: JSON.stringify(body),
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 948 days ago