feat: Convert all app files to JS

This commit is contained in:
Faruk AYDIN
2024-01-05 17:44:21 +01:00
parent b95478b635
commit 43dba351c3
1030 changed files with 5114 additions and 6436 deletions

View File

@@ -1,12 +1,12 @@
import verifyCredentials from "./verify-credentials";
import isStillVerified from "./is-still-verified";
import verifyCredentials from './verify-credentials.js';
import isStillVerified from './is-still-verified.js';
export default {
fields: [
{
key: 'secretKey',
label: 'Secret Key',
type: 'string' as const,
type: 'string',
required: true,
readOnly: false,
value: null,
@@ -17,15 +17,16 @@ export default {
{
key: 'displayName',
label: 'Account Name',
type: 'string' as const,
type: 'string',
required: true,
readOnly: false,
value: null,
placeholder: null,
description: 'The display name that identifies this stripe connection - most likely the associated account name',
description:
'The display name that identifies this stripe connection - most likely the associated account name',
clickToCopy: false,
},
],
verifyCredentials,
isStillVerified
};
isStillVerified,
};

View File

@@ -0,0 +1,8 @@
import verifyCredentials from './verify-credentials.js';
const isStillVerified = async ($) => {
await verifyCredentials($);
return true;
};
export default isStillVerified;

View File

@@ -1,9 +0,0 @@
import { IGlobalVariable } from '@automatisch/types';
import verifyCredentials from "./verify-credentials";
const isStillVerified = async ($: IGlobalVariable) => {
await verifyCredentials($);
return true;
};
export default isStillVerified;

View File

@@ -0,0 +1,8 @@
const verifyCredentials = async ($) => {
await $.http.get(`/v1/events`);
await $.auth.set({
screenName: $.auth.data?.displayName,
});
};
export default verifyCredentials;

View File

@@ -1,12 +0,0 @@
import { IGlobalVariable } from '@automatisch/types';
const verifyCredentials = async ($: IGlobalVariable) => {
await $.http.get(
`/v1/events`,
);
await $.auth.set({
screenName: $.auth.data?.displayName,
});
};
export default verifyCredentials;