Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(*): MapDeclaration Parse & Print #641

Merged
merged 18 commits into from
May 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(*): type definitions updated
Signed-off-by: jonathan.casey <[email protected]>
  • Loading branch information
jonathan-casey committed Apr 25, 2023
commit 34c6f12ec3da286605a1ab537636a6c2aab1b46b
3 changes: 2 additions & 1 deletion packages/concerto-core/types/lib/model/identifiable.d.ts
jonathan-casey marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ declare class Identifiable extends Typed {
* @protected
*/
protected constructor();
$identifier: string;
$identifierFieldName: any;
$timestamp: string;
/**
* Get the timestamp of this instance
@@ -42,6 +42,7 @@ declare class Identifiable extends Typed {
* @param {string} id - the new identifier for this object
*/
setIdentifier(id: string): void;
$identifier: string;
/**
* Get the fully qualified identifier of this instance.
* (namespace '.' type '#' identifier).
16 changes: 16 additions & 0 deletions packages/concerto-core/types/lib/modelutil.d.ts
jonathan-casey marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -118,4 +118,20 @@ declare class ModelUtil {
* @returns {string} the fully qualified name minus the namespace version
*/
static removeNamespaceVersionFromFullyQualifiedName(fqn: string): string;
/**
* Returns true if the property is a system property.
* System properties are not declared in the model.
* @param {String} propertyName - the name of the property
* @return {Boolean} true if the property is a system property
* @private
*/
private static isSystemProperty;
/**
* Returns true if the property is an system property that can be set in serialized JSON.
* System properties are not declared in the model.
* @param {String} propertyName - the name of the property
* @return {Boolean} true if the property is a system property
* @private
*/
private static isPrivateSystemProperty;
}
jonathan-casey marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -20,10 +20,11 @@ declare class JSONGenerator {
* in the object graph only the first instance is serialized, with only the $id
* written for subsequent instances, false by default.
* @param {boolean} [convertResourcesToId] Convert resources that
* @param {boolean} [ergo] - Deprecated - This is a dummy parameter to avoid breaking any consumers. It will be removed in a future release.
* are specified for relationship fields into their id, false by default.
* @param {number} [utcOffset] UTC Offset for DateTime values.
*/
constructor(convertResourcesToRelationships?: boolean, permitResourcesForRelationships?: boolean, deduplicateResources?: boolean, convertResourcesToId?: boolean, utcOffset?: number);
constructor(convertResourcesToRelationships?: boolean, permitResourcesForRelationships?: boolean, deduplicateResources?: boolean, convertResourcesToId?: boolean, ergo?: boolean, utcOffset?: number);
convertResourcesToRelationships: boolean;
permitResourcesForRelationships: boolean;
deduplicateResources: boolean;
jonathan-casey marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -16,10 +16,12 @@ declare class JSONPopulator {
* Constructor.
* @param {boolean} [acceptResourcesForRelationships] Permit resources in the
* place of relationships, false by default.
* @param {boolean} [ergo] - Deprecated - This is a dummy parameter to avoid breaking any consumers. It will be removed in a future release.
* @param {number} [utcOffset] - UTC Offset for DateTime values.
* @param {number} [strictQualifiedDateTimes] - Only allow fully-qualified date-times with offsets.

*/
constructor(acceptResourcesForRelationships?: boolean, utcOffset?: number, strictQualifiedDateTimes?: number);
constructor(acceptResourcesForRelationships?: boolean, ergo?: boolean, utcOffset?: number, strictQualifiedDateTimes?: number);
acceptResourcesForRelationships: boolean;
utcOffset: number;
strictQualifiedDateTimes: number;
jonathan-casey marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -133,14 +133,6 @@ declare class ResourceValidator {
* @private
*/
private visitClassDeclaration;
/**
* Returns true if the property is a system property.
* System properties are not declared in the model.
* @param {String} propertyName - the name of the property
* @return {Boolean} true if the property is a system property
* @private
*/
private isSystemProperty;
/**
* Visitor design pattern
* @param {Field} field - the object being visited