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

Prevent RestObject '_client' from showing up in serialization #162

Merged
merged 1 commit into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-force-project",
"version": "3.4.4",
"version": "3.5.0",
"description": "",
"scripts": {
"postinstall": "cd ts-force && npm install && npm run build && cd ../ts-force-gen && npm install",
Expand Down
2 changes: 1 addition & 1 deletion ts-force-gen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-force-gen",
"version": "3.4.4",
"version": "3.5.0",
"description": "Code generation for ts-force",
"main": "build/index.js",
"typings": "build/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion ts-force/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ts-force",
"version": "3.4.4",
"version": "3.5.0",
"description": "a typescript client for connecting with salesforce APIs",
"main": "build/index.js",
"typings": "build/index.d.ts",
Expand Down
7 changes: 6 additions & 1 deletion ts-force/src/rest/restObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ export abstract class RestObject extends SObject {

constructor(type: string, client?: Rest) {
super(type, client);
this._client = client || new Rest();
Object.defineProperty(this, '_client', {
value: client || new Rest(),
writable: true,
configurable: true,
enumerable: false,
});
}

protected initObject(fields?: Partial<FieldProps<RestObject>>) {
Expand Down
Loading