Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Commit

Permalink
kintone field record should have error field.
Browse files Browse the repository at this point in the history
  • Loading branch information
yokotaso committed Jan 29, 2019
1 parent 6887989 commit ec956e2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yokotaso/kintone-typlify",
"version": "0.0.5",
"version": "0.0.6",
"description": "Types for kintone js api and Types generating tools",
"main": "dist/index.js",
"scripts": {
Expand Down
34 changes: 34 additions & 0 deletions src/integration-tests/testfields.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,86 +7,103 @@ declare namespace kintone.types {
Record_number: {
type: "RECORD_NUMBER";
value: string;
error?: string;
};

Text: {
type: "SINGLE_LINE_TEXT";
value: string;
error?: string;
};

Rich_text: {
type: "RICH_TEXT";
value: string;
error?: string;
};

Text_area: {
type: "MULTI_LINE_TEXT";
value: string;
error?: string;
};

Number: {
type: "NUMBER";
value: string;
error?: string;
};

Calculated: {
type: "CALC";
value: string;
error?: string;
};

Radio_button: {
type: "RADIO_BUTTON";
value: string;
error?: string;
};

Drop_down: {
type: "DROP_DOWN";
value: string;
error?: string;
};

Date: {
type: "DATE";
value: string;
error?: string;
};

Time: {
type: "TIME";
value: string;
error?: string;
};

Date_and_time: {
type: "DATETIME";
value: string;
error?: string;
};

Link: {
type: "LINK";
value: string;
error?: string;
};

Check_box: {
type: "CHECK_BOX";
value: string[];
error?: string;
};

Multi_choice: {
type: "MULTI_SELECT";
value: string[];
error?: string;
};

User_selection: {
type: "USER_SELECT";
value: { code: string; name: string }[];
error?: string;
};

Department_selection: {
type: "ORGANIZATION_SELECT";
value: { code: string; name: string }[];
error?: string;
};

Group_selection: {
type: "GROUP_SELECT";
value: { code: string; name: string }[];
error?: string;
};

Attachment: {
Expand All @@ -97,6 +114,7 @@ declare namespace kintone.types {
name: string;
size: string;
}[];
error?: string;
};

Table: {
Expand All @@ -107,26 +125,31 @@ declare namespace kintone.types {
Text_Table: {
type: "SINGLE_LINE_TEXT";
value: string;
error?: string;
};

Rich_text_Table: {
type: "RICH_TEXT";
value: string;
error?: string;
};

Text_area_Table: {
type: "MULTI_LINE_TEXT";
value: string;
error?: string;
};

Number_Table: {
type: "NUMBER";
value: string;
error?: string;
};

Calculated_Table: {
type: "CALC";
value: string;
error?: string;
};
};
}[];
Expand All @@ -140,41 +163,49 @@ declare namespace kintone.types {
Radio_button_Table: {
type: "RADIO_BUTTON";
value: string;
error?: string;
};

Drop_down_Table: {
type: "DROP_DOWN";
value: string;
error?: string;
};

Date_Table: {
type: "DATE";
value: string;
error?: string;
};

Time_Table: {
type: "TIME";
value: string;
error?: string;
};

Date_and_time_Table: {
type: "DATETIME";
value: string;
error?: string;
};

Link_Table: {
type: "LINK";
value: string;
error?: string;
};

Check_box_Table: {
type: "CHECK_BOX";
value: string[];
error?: string;
};

Multi_choice_Table: {
type: "MULTI_SELECT";
value: string[];
error?: string;
};

Attachment_Table: {
Expand All @@ -185,6 +216,7 @@ declare namespace kintone.types {
name: string;
size: string;
}[];
error?: string;
};
};
}[];
Expand Down Expand Up @@ -214,11 +246,13 @@ declare namespace kintone.types {
Updated_datetime: {
type: "UPDATED_TIME";
value: string;
error?: string;
};

Created_datetime: {
type: "CREATED_TIME";
value: string;
error?: string;
};
}
}
4 changes: 4 additions & 0 deletions src/templates/fields.d.ts.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{f.code}} : {
type: "{{f.type}}";
value: string;
error?: string;
}{{";" if not loop.last}}
{% endfor %}
{%endmacro%}
Expand All @@ -12,6 +13,7 @@
{{s.code}} : {
type: "{{s.type}}";
value : string[];
error?: string;
}{{";" if not loop.last}}
{% endfor %}
{% endmacro %}
Expand All @@ -30,6 +32,7 @@
{{u.code}} : {
type: "{{u.type}}";
value: {code: string, name: string}[];
error?: string;
}{{";" if not loop.last}}
{% endfor %}
{%endmacro%}
Expand All @@ -44,6 +47,7 @@
name: string;
size: string;
}[];
error?: string;
}{{";" if not loop.last}}
{% endfor %}
{%endmacro%}
Expand Down

0 comments on commit ec956e2

Please sign in to comment.