@anjir/app-google-search-console
Version:
مدیریت و تحلیل وبسایت در Google Search Console
27 lines • 990 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.commonProps = void 0;
const tslib_1 = require("tslib");
const __1 = require("../../");
const apps_framework_1 = require("@anjir/apps-framework");
exports.commonProps = {
siteUrl: apps_framework_1.Property.Dropdown({
displayName: 'آدرس وبسایت',
required: true,
refreshers: [],
refreshOnSearch: false,
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
const authValue = auth;
const webmasters = (0, __1.createAuthClient)(authValue.access_token);
const res = yield webmasters.sites.list();
const sites = res.data.siteEntry || [];
return {
options: sites.map((site) => ({
label: site.siteUrl,
value: site.siteUrl,
})),
};
}),
}),
};
//# sourceMappingURL=index.js.map