Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@coveo/atomic-hosted-page

Package Overview
Dependencies
Maintainers
16
Versions
1300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coveo/atomic-hosted-page - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

dist/atomic-hosted-page/p-1161c80a.js

2

dist/atomic-hosted-page/atomic-hosted-page.esm.js

@@ -1,2 +0,2 @@

import{p as i,b as t}from"./p-d60c5453.js";const o=()=>{const t=import.meta.url;const o={};if(t!==""){o.resourcesUrl=new URL(".",t).href}return i(o)};o().then((i=>t([["p-07fbb443",[[0,"atomic-hosted-page",{initialize:[64]}]]],["p-786c2c25",[[0,"atomic-simple-builder",{initialize:[64]}]]]],i)));
import{p as i,b as t}from"./p-d60c5453.js";const n=()=>{const t=import.meta.url;const n={};if(t!==""){n.resourcesUrl=new URL(".",t).href}return i(n)};n().then((i=>t([["p-f3be730a",[[0,"atomic-hosted-page",{initialize:[64],getOrganizationEndpoints:[64]}]]],["p-5ed67567",[[0,"atomic-simple-builder",{initialize:[64],getOrganizationEndpoints:[64]}]]]],i)));
//# sourceMappingURL=atomic-hosted-page.esm.js.map

@@ -6,3 +6,3 @@ 'use strict';

const index = require('./index-4798ddc4.js');
const hostedPages = require('./hosted-pages-728de99f.js');
const hostedPages = require('./hosted-pages-319cf6fc.js');

@@ -14,17 +14,9 @@ const AtomicHostedPage = class {

validateOptions(opts) {
try {
new hostedPages.Schema({
organizationId: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
pageId: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
accessToken: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
platformUrl: new hostedPages.StringValue({ required: false, emptyAllowed: false }),
}).validate(opts);
}
catch (e) {
console.error(e);
}
hostedPages.validateOptions(opts, {
pageId: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
});
}
async initialize(options) {
this.validateOptions(options);
const platformUrl = options.platformUrl || 'https://platform.cloud.coveo.com';
const platformUrl = hostedPages.extractPlatformUrl(options);
try {

@@ -42,2 +34,10 @@ const pageResponse = await fetch(`${platformUrl}/rest/organizations/${options.organizationId}/hostedpages/${options.pageId}`, {

}
/**
* Returns the unique, organization-specific endpoint(s)
* @param {string} organizationId
* @param {'prod'|'hipaa'|'staging'|'dev'} [env=Prod]
*/
async getOrganizationEndpoints(organizationId, env = 'prod') {
return hostedPages.on(organizationId, env);
}
get element() { return index.getElement(this); }

@@ -44,0 +44,0 @@ };

@@ -18,5 +18,5 @@ 'use strict';

patchBrowser().then(options => {
return index.bootstrapLazy([["atomic-hosted-page.cjs",[[0,"atomic-hosted-page",{"initialize":[64]}]]],["atomic-simple-builder.cjs",[[0,"atomic-simple-builder",{"initialize":[64]}]]]], options);
return index.bootstrapLazy([["atomic-hosted-page.cjs",[[0,"atomic-hosted-page",{"initialize":[64],"getOrganizationEndpoints":[64]}]]],["atomic-simple-builder.cjs",[[0,"atomic-simple-builder",{"initialize":[64],"getOrganizationEndpoints":[64]}]]]], options);
});
//# sourceMappingURL=atomic-hosted-page.cjs.js.map

@@ -6,3 +6,3 @@ 'use strict';

const index = require('./index-4798ddc4.js');
const hostedPages = require('./hosted-pages-728de99f.js');
const hostedPages = require('./hosted-pages-319cf6fc.js');

@@ -14,17 +14,9 @@ const AtomicSimpleBuilder = class {

validateOptions(opts) {
try {
new hostedPages.Schema({
organizationId: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
interfaceId: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
accessToken: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
platformUrl: new hostedPages.StringValue({ required: false, emptyAllowed: false }),
}).validate(opts);
}
catch (e) {
console.error(e);
}
hostedPages.validateOptions(opts, {
interfaceId: new hostedPages.StringValue({ required: true, emptyAllowed: false }),
});
}
async initialize(options) {
this.validateOptions(options);
const platformUrl = options.platformUrl || 'https://platform.cloud.coveo.com';
const platformUrl = hostedPages.extractPlatformUrl(options);
try {

@@ -42,2 +34,10 @@ const pageResponse = await fetch(`${platformUrl}/rest/organizations/${options.organizationId}/searchinterfaces/${options.interfaceId}/hostedpage/v1`, {

}
/**
* Returns the unique, organization-specific endpoint(s)
* @param {string} organizationId
* @param {'prod'|'hipaa'|'staging'|'dev'} [env=Prod]
*/
async getOrganizationEndpoints(organizationId, env = 'prod') {
return hostedPages.on(organizationId, env);
}
get element() { return index.getElement(this); }

@@ -44,0 +44,0 @@ };

@@ -17,3 +17,3 @@ 'use strict';

return patchEsm().then(() => {
return index.bootstrapLazy([["atomic-hosted-page.cjs",[[0,"atomic-hosted-page",{"initialize":[64]}]]],["atomic-simple-builder.cjs",[[0,"atomic-simple-builder",{"initialize":[64]}]]]], options);
return index.bootstrapLazy([["atomic-hosted-page.cjs",[[0,"atomic-hosted-page",{"initialize":[64],"getOrganizationEndpoints":[64]}]]],["atomic-simple-builder.cjs",[[0,"atomic-simple-builder",{"initialize":[64],"getOrganizationEndpoints":[64]}]]]], options);
});

@@ -20,0 +20,0 @@ };

import { r as registerInstance, g as getElement } from './index-7c6277cb.js';
import { S as Schema, a as StringValue, p as processHostedPage } from './hosted-pages-51734977.js';
import { v as validateOptions, p as processHostedPage, o as on, S as StringValue, e as extractPlatformUrl } from './hosted-pages-16a03b46.js';

@@ -9,17 +9,9 @@ const AtomicHostedPage = class {

validateOptions(opts) {
try {
new Schema({
organizationId: new StringValue({ required: true, emptyAllowed: false }),
pageId: new StringValue({ required: true, emptyAllowed: false }),
accessToken: new StringValue({ required: true, emptyAllowed: false }),
platformUrl: new StringValue({ required: false, emptyAllowed: false }),
}).validate(opts);
}
catch (e) {
console.error(e);
}
validateOptions(opts, {
pageId: new StringValue({ required: true, emptyAllowed: false }),
});
}
async initialize(options) {
this.validateOptions(options);
const platformUrl = options.platformUrl || 'https://platform.cloud.coveo.com';
const platformUrl = extractPlatformUrl(options);
try {

@@ -37,2 +29,10 @@ const pageResponse = await fetch(`${platformUrl}/rest/organizations/${options.organizationId}/hostedpages/${options.pageId}`, {

}
/**
* Returns the unique, organization-specific endpoint(s)
* @param {string} organizationId
* @param {'prod'|'hipaa'|'staging'|'dev'} [env=Prod]
*/
async getOrganizationEndpoints(organizationId, env = 'prod') {
return on(organizationId, env);
}
get element() { return getElement(this); }

@@ -39,0 +39,0 @@ };

@@ -16,5 +16,5 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-7c6277cb.js';

patchBrowser().then(options => {
return bootstrapLazy([["atomic-hosted-page",[[0,"atomic-hosted-page",{"initialize":[64]}]]],["atomic-simple-builder",[[0,"atomic-simple-builder",{"initialize":[64]}]]]], options);
return bootstrapLazy([["atomic-hosted-page",[[0,"atomic-hosted-page",{"initialize":[64],"getOrganizationEndpoints":[64]}]]],["atomic-simple-builder",[[0,"atomic-simple-builder",{"initialize":[64],"getOrganizationEndpoints":[64]}]]]], options);
});
//# sourceMappingURL=atomic-hosted-page.js.map
import { r as registerInstance, g as getElement } from './index-7c6277cb.js';
import { S as Schema, a as StringValue, p as processHostedPage } from './hosted-pages-51734977.js';
import { v as validateOptions, p as processHostedPage, o as on, S as StringValue, e as extractPlatformUrl } from './hosted-pages-16a03b46.js';

@@ -9,17 +9,9 @@ const AtomicSimpleBuilder = class {

validateOptions(opts) {
try {
new Schema({
organizationId: new StringValue({ required: true, emptyAllowed: false }),
interfaceId: new StringValue({ required: true, emptyAllowed: false }),
accessToken: new StringValue({ required: true, emptyAllowed: false }),
platformUrl: new StringValue({ required: false, emptyAllowed: false }),
}).validate(opts);
}
catch (e) {
console.error(e);
}
validateOptions(opts, {
interfaceId: new StringValue({ required: true, emptyAllowed: false }),
});
}
async initialize(options) {
this.validateOptions(options);
const platformUrl = options.platformUrl || 'https://platform.cloud.coveo.com';
const platformUrl = extractPlatformUrl(options);
try {

@@ -37,2 +29,10 @@ const pageResponse = await fetch(`${platformUrl}/rest/organizations/${options.organizationId}/searchinterfaces/${options.interfaceId}/hostedpage/v1`, {

}
/**
* Returns the unique, organization-specific endpoint(s)
* @param {string} organizationId
* @param {'prod'|'hipaa'|'staging'|'dev'} [env=Prod]
*/
async getOrganizationEndpoints(organizationId, env = 'prod') {
return on(organizationId, env);
}
get element() { return getElement(this); }

@@ -39,0 +39,0 @@ };

@@ -13,3 +13,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-7c6277cb.js';

return patchEsm().then(() => {
return bootstrapLazy([["atomic-hosted-page",[[0,"atomic-hosted-page",{"initialize":[64]}]]],["atomic-simple-builder",[[0,"atomic-simple-builder",{"initialize":[64]}]]]], options);
return bootstrapLazy([["atomic-hosted-page",[[0,"atomic-hosted-page",{"initialize":[64],"getOrganizationEndpoints":[64]}]]],["atomic-simple-builder",[[0,"atomic-simple-builder",{"initialize":[64],"getOrganizationEndpoints":[64]}]]]], options);
});

@@ -16,0 +16,0 @@ };

@@ -0,3 +1,5 @@

import { PlatformEnvironment } from '@coveo/headless';
import { ComponentInterface } from '../../stencil-public-runtime';
interface AtomicHostedPageInitializationOptions {
import { InitializationOptions } from '../utils/options-utils';
interface AtomicHostedPageInitializationOptions extends InitializationOptions {
/**

@@ -7,16 +9,2 @@ * The unique identifier of the hosted page.

pageId: string;
/**
* The unique identifier of the target Coveo Cloud organization (e.g., `mycoveocloudorganizationg8tp8wu3`)
*/
organizationId: string;
/**
* The access token to use to authenticate requests against the Coveo Cloud endpoints. Typically, this will be an API key or search token that grants the privileges to execute queries and push usage analytics data in the target Coveo Cloud organization.
*/
accessToken: string;
/**
* The Plaform URL to use. (e.g., https://platform.cloud.coveo.com)
* The platformUrl() helper method can be useful to know what url is available.
* @defaultValue `https://platform.cloud.coveo.com`
*/
platformUrl?: string;
}

@@ -32,3 +20,14 @@ /**

initialize(options: AtomicHostedPageInitializationOptions): Promise<void>;
/**
* Returns the unique, organization-specific endpoint(s)
* @param {string} organizationId
* @param {'prod'|'hipaa'|'staging'|'dev'} [env=Prod]
*/
getOrganizationEndpoints(organizationId: string, env?: PlatformEnvironment): Promise<{
platform: string;
analytics: string;
search: string;
admin: string;
}>;
}
export {};

@@ -0,3 +1,5 @@

import { PlatformEnvironment } from '@coveo/headless';
import { ComponentInterface } from '../../stencil-public-runtime';
interface AtomicSimpleBuilderInitializationOptions {
import { InitializationOptions } from '../utils/options-utils';
interface AtomicSimpleBuilderInitializationOptions extends InitializationOptions {
/**

@@ -7,16 +9,2 @@ * The unique identifier of the search interface.

interfaceId: string;
/**
* The unique identifier of the target Coveo Cloud organization (e.g., `mycoveocloudorganizationg8tp8wu3`)
*/
organizationId: string;
/**
* The access token to use to authenticate requests against the Coveo Cloud endpoints. Typically, this will be an API key or search token that grants the privileges to execute queries and push usage analytics data in the target Coveo Cloud organization.
*/
accessToken: string;
/**
* The Plaform URL to use. (e.g., https://platform.cloud.coveo.com)
* The platformUrl() helper method can be useful to know what url is available.
* @defaultValue `https://platform.cloud.coveo.com`
*/
platformUrl?: string;
}

@@ -32,3 +20,14 @@ /**

initialize(options: AtomicSimpleBuilderInitializationOptions): Promise<void>;
/**
* Returns the unique, organization-specific endpoint(s)
* @param {string} organizationId
* @param {'prod'|'hipaa'|'staging'|'dev'} [env=Prod]
*/
getOrganizationEndpoints(organizationId: string, env?: PlatformEnvironment): Promise<{
platform: string;
analytics: string;
search: string;
admin: string;
}>;
}
export {};

@@ -8,7 +8,20 @@ /* eslint-disable */

import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
import { PlatformEnvironment } from "@coveo/headless";
export namespace Components {
interface AtomicHostedPage {
/**
* Returns the unique, organization-specific endpoint(s)
* @param organizationId
* @param env
*/
"getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>;
"initialize": (options: AtomicHostedPageInitializationOptions) => Promise<void>;
}
interface AtomicSimpleBuilder {
/**
* Returns the unique, organization-specific endpoint(s)
* @param organizationId
* @param env
*/
"getOrganizationEndpoints": (organizationId: string, env?: PlatformEnvironment) => Promise<{ platform: string; analytics: string; search: string; admin: string; }>;
"initialize": (options: AtomicSimpleBuilderInitializationOptions) => Promise<void>;

@@ -15,0 +28,0 @@ }

{
"name": "@coveo/atomic-hosted-page",
"description": "Web Component used to inject a Coveo Hosted Search Page in the DOM.",
"version": "0.2.3",
"version": "0.3.0",
"repository": {

@@ -36,2 +36,3 @@ "type": "git",

"@coveo/bueno": "0.43.1",
"@coveo/headless": "2.14.0",
"@stencil/core": "2.17.3"

@@ -38,0 +39,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc