Skip to content

Commit

Permalink
chore(td-tools): deprecate thing-model-helpers' exports (#1306)
Browse files Browse the repository at this point in the history
* chore(td-tools): deprecate thing-model-helpers' exports

Signed-off-by: Hasan Eroglu <[email protected]>

* chore(td-tools): fix grammar

Signed-off-by: Hasan Eroglu <[email protected]>

* chore(td-tools): run prettier

Signed-off-by: Hasan Eroglu <[email protected]>

---------

Signed-off-by: Hasan Eroglu <[email protected]>
  • Loading branch information
hasanheroglu authored Jul 15, 2024
1 parent 80f63aa commit 17d1090
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/td-tools/src/thing-model-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,51 @@ const tmSchema = TMSchema;
const ajv = new Ajv({ strict: false });
addFormats(ajv);

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export type LINK_TYPE = "tm:extends" | "tm:submodel";

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export type AFFORDANCE_TYPE = "properties" | "actions" | "events";

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export type COMPOSITION_TYPE = "extends" | "imports";

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export type ModelImportsInput = {
uri?: string;
type: AFFORDANCE_TYPE;
name: string;
};

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export type CompositionOptions = {
baseUrl?: string;
selfComposition?: boolean;
map?: Record<string, unknown>;
};

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export type modelComposeInput = {
extends?: ThingModel[];
imports?: (ModelImportsInput & { affordance: DataSchema })[];
submodel?: Record<string, ThingModel>;
};

/**
* @deprecated This package and therefore its functionality will be removed in the future. Please use '@thingweb/thing-model' package instead.
*/
export class ThingModelHelpers {
static tsSchemaValidator = ajv.compile(tmSchema) as ValidateFunction;

Expand Down

0 comments on commit 17d1090

Please sign in to comment.