@kilterset/auth0-actions-testing
Version:
Test and develop Auth0 Actions or Okta CIC Actions locally.
20 lines (16 loc) • 473 B
text/typescript
import Auth0 from "../types";
import { chance } from "./chance";
import { define } from "./define";
export const organization = define<Auth0.Organization>(({ params }) => {
const display_name = params.display_name || chance.company();
const name = display_name
.toLowerCase()
.replace(/\s+/g, "-")
.replace(/[^a-z0-9-]/g, "");
return {
display_name,
name,
id: `org_${chance.string({ alpha: true, length: 16 })}`,
metadata: {},
};
});