@credal/actions 0.2.21 → 0.2.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6888,11 +6888,11 @@ export const oktaTriggerOktaWorkflowDefinition = {
|
|
6888
6888
|
scopes: ["okta.workflows.manage"],
|
6889
6889
|
parameters: {
|
6890
6890
|
type: "object",
|
6891
|
-
required: ["
|
6891
|
+
required: ["workflowId"],
|
6892
6892
|
properties: {
|
6893
|
-
|
6893
|
+
workflowId: {
|
6894
6894
|
type: "string",
|
6895
|
-
description: "The unique
|
6895
|
+
description: "The unique ID of the workflow",
|
6896
6896
|
},
|
6897
6897
|
workflowParameters: {
|
6898
6898
|
type: "object",
|
@@ -4151,13 +4151,13 @@ export declare const oktaResetPasswordOutputSchema: z.ZodObject<{
|
|
4151
4151
|
export type oktaResetPasswordOutputType = z.infer<typeof oktaResetPasswordOutputSchema>;
|
4152
4152
|
export type oktaResetPasswordFunction = ActionFunction<oktaResetPasswordParamsType, AuthParamsType, oktaResetPasswordOutputType>;
|
4153
4153
|
export declare const oktaTriggerOktaWorkflowParamsSchema: z.ZodObject<{
|
4154
|
-
|
4154
|
+
workflowId: z.ZodString;
|
4155
4155
|
workflowParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
4156
4156
|
}, "strip", z.ZodTypeAny, {
|
4157
|
-
|
4157
|
+
workflowId: string;
|
4158
4158
|
workflowParameters?: Record<string, string> | undefined;
|
4159
4159
|
}, {
|
4160
|
-
|
4160
|
+
workflowId: string;
|
4161
4161
|
workflowParameters?: Record<string, string> | undefined;
|
4162
4162
|
}>;
|
4163
4163
|
export type oktaTriggerOktaWorkflowParamsType = z.infer<typeof oktaTriggerOktaWorkflowParamsSchema>;
|
@@ -2611,9 +2611,7 @@ export const oktaResetPasswordOutputSchema = z.object({
|
|
2611
2611
|
resetPasswordUrl: z.string().describe("The URL for resetting the password manually.").optional(),
|
2612
2612
|
});
|
2613
2613
|
export const oktaTriggerOktaWorkflowParamsSchema = z.object({
|
2614
|
-
|
2615
|
-
.string()
|
2616
|
-
.describe("The unique URL path, which is created when a Workflow HTTP Connector card is configured."),
|
2614
|
+
workflowId: z.string().describe("The unique ID of the workflow"),
|
2617
2615
|
workflowParameters: z
|
2618
2616
|
.record(z.string())
|
2619
2617
|
.describe("A key,value pair where the keys are the input variables the values are the values of those fields.")
|
@@ -11,7 +11,7 @@ import { MISSING_AUTH_TOKEN } from "../../util/missingAuthConstants.js";
|
|
11
11
|
const GITLAB_API_URL = "https://gitlab.com";
|
12
12
|
function gitlabFetch(endpoint, authToken) {
|
13
13
|
return __awaiter(this, void 0, void 0, function* () {
|
14
|
-
const res = yield fetch(
|
14
|
+
const res = yield fetch(endpoint, {
|
15
15
|
headers: { Authorization: `Bearer ${authToken}` },
|
16
16
|
});
|
17
17
|
if (!res.ok)
|
@@ -12,7 +12,7 @@ import { axiosClient } from "../../util/axiosClient.js";
|
|
12
12
|
const triggerOktaWorkflow = (_a) => __awaiter(void 0, [_a], void 0, function* ({ authParams, params, }) {
|
13
13
|
var _b, _c;
|
14
14
|
const { authToken, subdomain } = authParams;
|
15
|
-
const {
|
15
|
+
const { workflowId, workflowParameters } = params;
|
16
16
|
if (!authToken || !subdomain) {
|
17
17
|
return { success: false, error: "Missing authToken or subdomain in authParams." };
|
18
18
|
}
|
@@ -20,7 +20,7 @@ const triggerOktaWorkflow = (_a) => __awaiter(void 0, [_a], void 0, function* ({
|
|
20
20
|
const requestConfig = {
|
21
21
|
headers: Object.assign({ Accept: "application/json", "Content-Type": "application/json" }, (authToken && { Authorization: `Bearer ${authToken}` })),
|
22
22
|
};
|
23
|
-
const workflowUrl = `https://${subdomain}.okta.com/api/flo
|
23
|
+
const workflowUrl = `https://${subdomain}.workflows.okta.com/api/flo/${workflowId}/invoke`;
|
24
24
|
const response = yield axiosClient.post(workflowUrl, workflowParameters || {}, requestConfig);
|
25
25
|
if (response.status >= 200 && response.status < 300) {
|
26
26
|
return { success: true, output: response.data };
|