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

SUBTABLE field requires type and value.id #448

Open
the-red opened this issue Apr 22, 2020 · 15 comments
Open

SUBTABLE field requires type and value.id #448

the-red opened this issue Apr 22, 2020 · 15 comments
Labels
pkg: dts-gen @kintone/dts-gen

Comments

@the-red
Copy link
Contributor

the-red commented Apr 22, 2020

I generated type definition of SUBTABLE field.
The type and value.id properties are required, which makes them difficult to use.

  Table: {
    type: 'SUBTABLE';
    value: {
      id: string;
      value: {
        text1: kintone.fieldTypes.SingleLineText;
        text2: kintone.fieldTypes.SingleLineText;
      };
    }[];
  };

I wish the type and value.id properties were no longer required.

  Table: {
    type?: 'SUBTABLE';
    value: {
      id?: string;
      value: {
        text1: kintone.fieldTypes.SingleLineText;
        text2: kintone.fieldTypes.SingleLineText;
      };
    }[];
  };
@koba04
Copy link
Contributor

koba04 commented Apr 24, 2020

@the-red
Thank you for reporting this! We are going to consider this.
Could you describe your use case?

@koba04
Copy link
Contributor

koba04 commented Apr 28, 2020

Changing these types optional also leads the usage inconvenient because it requires to check whether the type exists or not and disables to infer using discriminated unions.
If the use case is a type for updating, it seems to be a good option to add another type for it

@the-red
Copy link
Contributor Author

the-red commented Apr 30, 2020

Sorry for the late response.

As you say, the use case is a type for updating.
To add record, I'd like to write as follows. But type error occurs.
image

It's hassle to write the following.
image

In a similar case, when I put a number in a field of type Number, I got an error.
It would be nice if you could prepare different types for the reference and update systems 🚀

    price: kintone.fieldTypes.Number

image
image

@koba04
Copy link
Contributor

koba04 commented May 2, 2020

@the-red Thank you for your clarification! We'll consider having a solution for this.

@koba04 koba04 transferred this issue from kintone-labs/dts-gen Oct 6, 2020
@koba04
Copy link
Contributor

koba04 commented Oct 6, 2020

We've merged dts-gen into js-sdk, so this issue has been transferred.

@koba04 koba04 added the pkg: dts-gen @kintone/dts-gen label Oct 6, 2020
@stale
Copy link

stale bot commented Mar 16, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Mar 16, 2021
@stale stale bot closed this as completed Mar 23, 2021
@koba04 koba04 reopened this Mar 23, 2021
@stale stale bot removed the wontfix This will not be worked on label Mar 23, 2021
@koba04
Copy link
Contributor

koba04 commented Mar 23, 2021

not stale

@stale
Copy link

stale bot commented May 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label May 22, 2021
@stale stale bot closed this as completed May 29, 2021
@the-red
Copy link
Contributor Author

the-red commented May 29, 2021

not stale

@zaki-yama zaki-yama reopened this May 31, 2021
@stale stale bot removed the wontfix This will not be worked on label May 31, 2021
@zaki-yama
Copy link
Contributor

@the-red
Thank you! I reopened.

@stale
Copy link

stale bot commented Jul 30, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 30, 2021
@zaki-yama zaki-yama removed the wontfix This will not be worked on label Jul 30, 2021
@the-red
Copy link
Contributor Author

the-red commented Jul 30, 2021

Not stale

@stale
Copy link

stale bot commented Sep 28, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Sep 28, 2021
@stale stale bot closed this as completed Oct 5, 2021
@the-red
Copy link
Contributor Author

the-red commented Oct 5, 2021

Not stale... 🤮

@shintaroNagata shintaroNagata reopened this Oct 6, 2021
@stale stale bot removed the wontfix This will not be worked on label Oct 6, 2021
@shintaroNagata
Copy link
Contributor

Ref: #447 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: dts-gen @kintone/dts-gen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants