@kintone/rest-api-client 3.3.3 → 3.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/esm/KintoneFields/exportTypes/__checks__/usecases/field.js +1 -1
  2. package/esm/KintoneFields/exportTypes/__checks__/usecases/layout.js +1 -1
  3. package/esm/KintoneFields/exportTypes/__checks__/usecases/property.js +1 -1
  4. package/esm/KintoneFields/types/field.d.ts +34 -34
  5. package/esm/KintoneFields/types/fieldLayout.d.ts +29 -29
  6. package/esm/KintoneFields/types/layout.d.ts +4 -4
  7. package/esm/KintoneFields/types/property.d.ts +32 -32
  8. package/esm/KintoneRequestConfigBuilder.d.ts +1 -1
  9. package/esm/KintoneRequestConfigBuilder.js +1 -1
  10. package/esm/KintoneRestAPIClient.d.ts +3 -3
  11. package/esm/__tests__/KintoneRequestConfigBuilder.test.js +1 -1
  12. package/esm/__tests__/KintoneResponseHandler.test.js +1 -1
  13. package/esm/client/AppClient.d.ts +6 -6
  14. package/esm/client/AppClient.js +1 -1
  15. package/esm/client/AppClient.js.map +1 -1
  16. package/esm/client/BulkRequestClient.d.ts +1 -1
  17. package/esm/client/FileClient.js +1 -1
  18. package/esm/client/RecordClient.d.ts +1 -1
  19. package/esm/client/RecordClient.js +1 -1
  20. package/esm/client/__tests__/AppClient.test.js +1 -1
  21. package/esm/client/__tests__/BulkRequestClient.test.js +1 -1
  22. package/esm/client/__tests__/File.test.js +1 -1
  23. package/esm/client/__tests__/RecordClient.test.js +1 -1
  24. package/esm/client/types/app/action.d.ts +7 -7
  25. package/esm/client/types/app/customize.d.ts +5 -5
  26. package/esm/client/types/app/form.d.ts +2 -2
  27. package/esm/client/types/app/index.d.ts +3 -3
  28. package/esm/client/types/app/notification.d.ts +6 -6
  29. package/esm/client/types/app/processManagement.d.ts +7 -7
  30. package/esm/client/types/app/report.d.ts +38 -38
  31. package/esm/client/types/app/right.d.ts +12 -12
  32. package/esm/client/types/app/view.d.ts +7 -7
  33. package/esm/client/types/entity.d.ts +2 -2
  34. package/esm/client/types/index.d.ts +3 -3
  35. package/esm/client/types/record/index.d.ts +5 -5
  36. package/esm/error/KintoneRestAPIError.d.ts +4 -4
  37. package/esm/http/AxiosClient.js +1 -1
  38. package/esm/http/HttpClientInterface.d.ts +6 -6
  39. package/esm/http/MockClient.d.ts +1 -1
  40. package/esm/http/MockClient.js +1 -1
  41. package/esm/platform/UnsupportedPlatformError.d.ts +1 -1
  42. package/esm/platform/__tests__/browser.test.d.ts +3 -0
  43. package/esm/platform/__tests__/browser.test.js +11 -2
  44. package/esm/platform/__tests__/browser.test.js.map +1 -1
  45. package/esm/platform/browser.js +1 -1
  46. package/esm/platform/index.d.ts +1 -1
  47. package/esm/platform/node.js +1 -1
  48. package/esm/types/auth.d.ts +6 -6
  49. package/lib/KintoneFields/exportTypes/__checks__/usecases/field.js +1 -1
  50. package/lib/KintoneFields/exportTypes/__checks__/usecases/layout.js +1 -1
  51. package/lib/KintoneFields/exportTypes/__checks__/usecases/property.js +1 -1
  52. package/lib/KintoneFields/types/field.d.ts +34 -34
  53. package/lib/KintoneFields/types/fieldLayout.d.ts +29 -29
  54. package/lib/KintoneFields/types/layout.d.ts +4 -4
  55. package/lib/KintoneFields/types/property.d.ts +32 -32
  56. package/lib/KintoneRequestConfigBuilder.d.ts +1 -1
  57. package/lib/KintoneRequestConfigBuilder.js +1 -1
  58. package/lib/KintoneRestAPIClient.d.ts +3 -3
  59. package/lib/__tests__/KintoneRequestConfigBuilder.test.js +1 -1
  60. package/lib/__tests__/KintoneResponseHandler.test.js +1 -1
  61. package/lib/client/AppClient.d.ts +6 -6
  62. package/lib/client/AppClient.js +1 -1
  63. package/lib/client/AppClient.js.map +1 -1
  64. package/lib/client/BulkRequestClient.d.ts +1 -1
  65. package/lib/client/FileClient.js +1 -1
  66. package/lib/client/RecordClient.d.ts +1 -1
  67. package/lib/client/RecordClient.js +1 -1
  68. package/lib/client/__tests__/AppClient.test.js +1 -1
  69. package/lib/client/__tests__/BulkRequestClient.test.js +1 -1
  70. package/lib/client/__tests__/File.test.js +1 -1
  71. package/lib/client/__tests__/RecordClient.test.js +1 -1
  72. package/lib/client/types/app/action.d.ts +7 -7
  73. package/lib/client/types/app/customize.d.ts +5 -5
  74. package/lib/client/types/app/form.d.ts +2 -2
  75. package/lib/client/types/app/index.d.ts +3 -3
  76. package/lib/client/types/app/notification.d.ts +6 -6
  77. package/lib/client/types/app/processManagement.d.ts +7 -7
  78. package/lib/client/types/app/report.d.ts +38 -38
  79. package/lib/client/types/app/right.d.ts +12 -12
  80. package/lib/client/types/app/view.d.ts +7 -7
  81. package/lib/client/types/entity.d.ts +2 -2
  82. package/lib/client/types/index.d.ts +3 -3
  83. package/lib/client/types/record/index.d.ts +5 -5
  84. package/lib/error/KintoneRestAPIError.d.ts +4 -4
  85. package/lib/http/AxiosClient.js +1 -1
  86. package/lib/http/HttpClientInterface.d.ts +6 -6
  87. package/lib/http/MockClient.d.ts +1 -1
  88. package/lib/http/MockClient.js +1 -1
  89. package/lib/platform/UnsupportedPlatformError.d.ts +1 -1
  90. package/lib/platform/__tests__/browser.test.d.ts +3 -0
  91. package/lib/platform/__tests__/browser.test.js +10 -1
  92. package/lib/platform/__tests__/browser.test.js.map +1 -1
  93. package/lib/platform/browser.js +1 -1
  94. package/lib/platform/index.d.ts +1 -1
  95. package/lib/platform/node.js +1 -1
  96. package/lib/types/auth.d.ts +6 -6
  97. package/package.json +2 -2
  98. package/umd/KintoneRestAPIClient.js +2 -2
  99. package/umd/KintoneRestAPIClient.min.js +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { Entity } from "../entity";
2
- declare type AssigneeEntityForResponse = {
2
+ type AssigneeEntityForResponse = {
3
3
  entity: Entity | {
4
4
  type: "FIELD_ENTITY" | "CUSTOM_FIELD";
5
5
  code: string;
@@ -9,7 +9,7 @@ declare type AssigneeEntityForResponse = {
9
9
  };
10
10
  includeSubs: boolean;
11
11
  };
12
- declare type AssigneeEntityForParameter = {
12
+ type AssigneeEntityForParameter = {
13
13
  entity: Entity | {
14
14
  type: "FIELD_ENTITY" | "CUSTOM_FIELD";
15
15
  code: string;
@@ -18,8 +18,8 @@ declare type AssigneeEntityForParameter = {
18
18
  };
19
19
  includeSubs?: boolean;
20
20
  };
21
- declare type AssigneeType = "ONE" | "ALL" | "ANY";
22
- export declare type StateForResponse = {
21
+ type AssigneeType = "ONE" | "ALL" | "ANY";
22
+ export type StateForResponse = {
23
23
  index: string;
24
24
  name: string;
25
25
  assignee: {
@@ -27,7 +27,7 @@ export declare type StateForResponse = {
27
27
  entities: AssigneeEntityForResponse[];
28
28
  };
29
29
  };
30
- export declare type StateForParameter = {
30
+ export type StateForParameter = {
31
31
  index: string | number;
32
32
  name?: string;
33
33
  assignee?: {
@@ -35,13 +35,13 @@ export declare type StateForParameter = {
35
35
  entities: AssigneeEntityForParameter[];
36
36
  };
37
37
  };
38
- export declare type ActionForResponse = {
38
+ export type ActionForResponse = {
39
39
  name: string;
40
40
  from: string;
41
41
  to: string;
42
42
  filterCond: string;
43
43
  };
44
- export declare type ActionForParameter = {
44
+ export type ActionForParameter = {
45
45
  name: string;
46
46
  from: string;
47
47
  to: string;
@@ -1,9 +1,9 @@
1
- export declare type ReportForParameter = {
1
+ export type ReportForParameter = {
2
2
  [reportName: string]: ReportProperty;
3
3
  };
4
- declare type ChartTypeWithRequiredMode = "BAR" | "COLUMN" | "AREA" | "SPLINE_AREA";
5
- declare type ChartTypeWithOptionalMode = "PIE" | "LINE" | "PIVOT_TABLE" | "TABLE" | "SPLINE";
6
- declare type ChartProps = {
4
+ type ChartTypeWithRequiredMode = "BAR" | "COLUMN" | "AREA" | "SPLINE_AREA";
5
+ type ChartTypeWithOptionalMode = "PIE" | "LINE" | "PIVOT_TABLE" | "TABLE" | "SPLINE";
6
+ type ChartProps = {
7
7
  name: string;
8
8
  index: string | number;
9
9
  groups?: Array<{
@@ -15,49 +15,49 @@ declare type ChartProps = {
15
15
  sorts?: Sort[];
16
16
  periodicReport?: PeriodicReportForParameters;
17
17
  };
18
- declare type ReportProperty = ({
18
+ type ReportProperty = ({
19
19
  chartType: ChartTypeWithOptionalMode;
20
20
  chartMode?: ChartMode;
21
21
  } | {
22
22
  chartType: ChartTypeWithRequiredMode;
23
23
  chartMode: ChartMode;
24
24
  }) & ChartProps;
25
- declare type PeriodicReportForParameters = {
25
+ type PeriodicReportForParameters = {
26
26
  active?: boolean | string;
27
27
  period?: PeriodReportPeriodYear | PeriodReportPeriodDay | PeriodReportPeriodQuater | PeriodReportPeriodMonth | PeriodReportPeriodWeek | PeriodReportPeriodHour;
28
28
  };
29
- declare type PeriodReportPeriodYear = {
29
+ type PeriodReportPeriodYear = {
30
30
  every: "YEAR";
31
31
  month: MonthOfYear;
32
32
  time: string;
33
33
  dayOfMonth: DayOfMonth;
34
34
  };
35
- declare type PeriodReportPeriodQuater = {
35
+ type PeriodReportPeriodQuater = {
36
36
  every: "QUARTER";
37
37
  pattern: QuarterPattern;
38
38
  time: string;
39
39
  dayOfMonth: DayOfMonth | EndOfMonth;
40
40
  };
41
- declare type PeriodReportPeriodMonth = {
41
+ type PeriodReportPeriodMonth = {
42
42
  every: "MONTH";
43
43
  time: string;
44
44
  dayOfMonth: DayOfMonth | EndOfMonth;
45
45
  };
46
- declare type PeriodReportPeriodWeek = {
46
+ type PeriodReportPeriodWeek = {
47
47
  every: "WEEK";
48
48
  dayOfWeek: DayOfWeek;
49
49
  time: string;
50
50
  };
51
- declare type PeriodReportPeriodDay = {
51
+ type PeriodReportPeriodDay = {
52
52
  every: "DAY";
53
53
  time: string;
54
54
  };
55
- declare type PeriodReportPeriodHour = {
55
+ type PeriodReportPeriodHour = {
56
56
  every: "HOUR";
57
57
  minute: MinuteOfHour;
58
58
  };
59
- export declare type ReportForResponse = ReportForResponseWithoutMode | ReportForResponseWithMode;
60
- declare type ReportForResponseBase = {
59
+ export type ReportForResponse = ReportForResponseWithoutMode | ReportForResponseWithMode;
60
+ type ReportForResponseBase = {
61
61
  chartType: ChartType;
62
62
  id: string;
63
63
  name: string;
@@ -68,71 +68,71 @@ declare type ReportForResponseBase = {
68
68
  sorts: Sort[];
69
69
  periodicReport: PeriodicReport | null;
70
70
  };
71
- declare type ReportForResponseWithoutMode = ReportForResponseBase & {
71
+ type ReportForResponseWithoutMode = ReportForResponseBase & {
72
72
  chartType: Exclude<ChartType, ChartTypeWithMode>;
73
73
  };
74
- declare type ReportForResponseWithMode = ReportForResponseBase & {
74
+ type ReportForResponseWithMode = ReportForResponseBase & {
75
75
  chartType: ChartTypeWithMode;
76
76
  chartMode: ChartMode;
77
77
  };
78
- declare type ChartType = "PIE" | "LINE" | "SPLINE" | "TABLE" | "PIVOT_TABLE" | "BAR" | "COLUMN" | "AREA" | "SPLINE_AREA";
79
- declare type ChartTypeWithMode = Extract<ChartType, "BAR" | "COLUMN" | "AREA" | "SPLINE_AREA">;
80
- declare type Group = {
78
+ type ChartType = "PIE" | "LINE" | "SPLINE" | "TABLE" | "PIVOT_TABLE" | "BAR" | "COLUMN" | "AREA" | "SPLINE_AREA";
79
+ type ChartTypeWithMode = Extract<ChartType, "BAR" | "COLUMN" | "AREA" | "SPLINE_AREA">;
80
+ type Group = {
81
81
  code: string;
82
82
  per: GroupPer;
83
83
  };
84
- declare type PeriodicReport = {
84
+ type PeriodicReport = {
85
85
  active: boolean;
86
86
  period: PeriodicReportPeriod;
87
87
  };
88
- declare type PeriodicReportPeriod = PeriodicReportPeriodYear | PeriodicReportPeriodQuarter | PeriodicReportPeriodMonth | PeriodicReportPeriodWeek | PeriodicReportPeriodDay | PeriodicReportPeriodHour;
89
- declare type PeriodicReportPeriodEvery = "YEAR" | "QUARTER" | "MONTH" | "WEEK" | "DAY" | "HOUR" | "MINUTE";
90
- declare type PeriodicReportPeriodYear = {
88
+ type PeriodicReportPeriod = PeriodicReportPeriodYear | PeriodicReportPeriodQuarter | PeriodicReportPeriodMonth | PeriodicReportPeriodWeek | PeriodicReportPeriodDay | PeriodicReportPeriodHour;
89
+ type PeriodicReportPeriodEvery = "YEAR" | "QUARTER" | "MONTH" | "WEEK" | "DAY" | "HOUR" | "MINUTE";
90
+ type PeriodicReportPeriodYear = {
91
91
  every: Extract<PeriodicReportPeriodEvery, "YEAR">;
92
92
  month: MonthOfYear;
93
93
  dayOfMonth: DayOfMonth;
94
94
  time: string;
95
95
  };
96
- declare type PeriodicReportPeriodQuarter = {
96
+ type PeriodicReportPeriodQuarter = {
97
97
  every: Extract<PeriodicReportPeriodEvery, "QUARTER">;
98
98
  pattern: QuarterPattern;
99
99
  dayOfMonth: DayOfMonth | EndOfMonth;
100
100
  time: string;
101
101
  };
102
- declare type PeriodicReportPeriodMonth = {
102
+ type PeriodicReportPeriodMonth = {
103
103
  every: Extract<PeriodicReportPeriodEvery, "MONTH">;
104
104
  dayOfMonth: DayOfMonth | EndOfMonth;
105
105
  time: string;
106
106
  };
107
- declare type PeriodicReportPeriodWeek = {
107
+ type PeriodicReportPeriodWeek = {
108
108
  every: Extract<PeriodicReportPeriodEvery, "WEEK">;
109
109
  dayOfWeek: DayOfWeek;
110
110
  time: string;
111
111
  };
112
- declare type PeriodicReportPeriodDay = {
112
+ type PeriodicReportPeriodDay = {
113
113
  every: Extract<PeriodicReportPeriodEvery, "DAY">;
114
114
  time: string;
115
115
  };
116
- declare type PeriodicReportPeriodHour = {
116
+ type PeriodicReportPeriodHour = {
117
117
  every: Extract<PeriodicReportPeriodEvery, "HOUR">;
118
118
  minute: MinuteOfHour;
119
119
  };
120
- declare type Sort = {
120
+ type Sort = {
121
121
  by: "TOTAL" | "GROUP1" | "GROUP2" | "GROUP3";
122
122
  order: "ASC" | "DESC";
123
123
  };
124
- declare type GroupPer = "YEAR" | "QUARTER" | "MONTH" | "WEEK" | "DAY" | "HOUR" | "MINUTE";
125
- declare type Aggregation = {
124
+ type GroupPer = "YEAR" | "QUARTER" | "MONTH" | "WEEK" | "DAY" | "HOUR" | "MINUTE";
125
+ type Aggregation = {
126
126
  type: "COUNT";
127
127
  } | {
128
128
  type: "SUM" | "AVERAGE" | "MAX" | "MIN";
129
129
  code: string;
130
130
  };
131
- declare type ChartMode = "NORMAL" | "STACKED" | "PERCENTAGE";
132
- declare type QuarterPattern = "JAN_APR_JUL_OCT" | "FEB_MAY_AUG_NOV" | "MAR_JUN_SEP_DEC";
133
- declare type MonthOfYear = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
134
- declare type DayOfWeek = "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY";
135
- declare type DayOfMonth = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31";
136
- declare type EndOfMonth = "END_OF_MONTH";
137
- declare type MinuteOfHour = "0" | "10" | "20" | "30" | "40" | "50";
131
+ type ChartMode = "NORMAL" | "STACKED" | "PERCENTAGE";
132
+ type QuarterPattern = "JAN_APR_JUL_OCT" | "FEB_MAY_AUG_NOV" | "MAR_JUN_SEP_DEC";
133
+ type MonthOfYear = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
134
+ type DayOfWeek = "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY";
135
+ type DayOfMonth = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31";
136
+ type EndOfMonth = "END_OF_MONTH";
137
+ type MinuteOfHour = "0" | "10" | "20" | "30" | "40" | "50";
138
138
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { Entity } from "../entity";
2
- declare type FieldRightAccessibility = "READ" | "WRITE" | "NONE";
3
- declare type FieldRightEntityForResponse = {
2
+ type FieldRightAccessibility = "READ" | "WRITE" | "NONE";
3
+ type FieldRightEntityForResponse = {
4
4
  accessibility: FieldRightAccessibility;
5
5
  entity: Entity | {
6
6
  type: "FIELD_ENTITY";
@@ -8,7 +8,7 @@ declare type FieldRightEntityForResponse = {
8
8
  };
9
9
  includeSubs: boolean;
10
10
  };
11
- declare type FieldRightEntityForParameter = {
11
+ type FieldRightEntityForParameter = {
12
12
  accessibility: FieldRightAccessibility;
13
13
  entity: Entity | {
14
14
  type: "FIELD_ENTITY";
@@ -16,15 +16,15 @@ declare type FieldRightEntityForParameter = {
16
16
  };
17
17
  includeSubs?: boolean;
18
18
  };
19
- export declare type FieldRightForResponse = {
19
+ export type FieldRightForResponse = {
20
20
  code: string;
21
21
  entities: FieldRightEntityForResponse[];
22
22
  };
23
- export declare type FieldRightForParameter = {
23
+ export type FieldRightForParameter = {
24
24
  code: string;
25
25
  entities: FieldRightEntityForParameter[];
26
26
  };
27
- export declare type AppRightEntityForResponse = {
27
+ export type AppRightEntityForResponse = {
28
28
  entity: Entity | {
29
29
  type: "CREATOR";
30
30
  code: null;
@@ -38,7 +38,7 @@ export declare type AppRightEntityForResponse = {
38
38
  recordImportable: boolean;
39
39
  recordExportable: boolean;
40
40
  };
41
- export declare type AppRightEntityForParameter = {
41
+ export type AppRightEntityForParameter = {
42
42
  entity: Entity | {
43
43
  type: "CREATOR";
44
44
  };
@@ -51,7 +51,7 @@ export declare type AppRightEntityForParameter = {
51
51
  recordImportable?: boolean;
52
52
  recordExportable?: boolean;
53
53
  };
54
- declare type RecordRightEntityForResponse = {
54
+ type RecordRightEntityForResponse = {
55
55
  entity: Entity | {
56
56
  type: "FIELD_ENTITY";
57
57
  code: string;
@@ -61,7 +61,7 @@ declare type RecordRightEntityForResponse = {
61
61
  deletable: boolean;
62
62
  includeSubs: boolean;
63
63
  };
64
- declare type RecordRightEntityForParameter = {
64
+ type RecordRightEntityForParameter = {
65
65
  entity: Entity | {
66
66
  type: "FIELD_ENTITY";
67
67
  code: string;
@@ -71,15 +71,15 @@ declare type RecordRightEntityForParameter = {
71
71
  deletable?: boolean;
72
72
  includeSubs?: boolean;
73
73
  };
74
- export declare type RecordRightForResponse = {
74
+ export type RecordRightForResponse = {
75
75
  entities: RecordRightEntityForResponse[];
76
76
  filterCond: string;
77
77
  };
78
- export declare type RecordRightForParameter = {
78
+ export type RecordRightForParameter = {
79
79
  entities: RecordRightEntityForParameter[];
80
80
  filterCond?: string;
81
81
  };
82
- export declare type EvaluatedRecordRight = {
82
+ export type EvaluatedRecordRight = {
83
83
  id: string;
84
84
  record: {
85
85
  viewable: boolean;
@@ -1,5 +1,5 @@
1
- declare type ViewType = "LIST" | "CALENDAR" | "CUSTOM";
2
- declare type ViewBaseForResponse = {
1
+ type ViewType = "LIST" | "CALENDAR" | "CUSTOM";
2
+ type ViewBaseForResponse = {
3
3
  index: string;
4
4
  builtinType?: "ASSIGNEE";
5
5
  id: string;
@@ -7,13 +7,13 @@ declare type ViewBaseForResponse = {
7
7
  filterCond: string;
8
8
  sort: string;
9
9
  };
10
- declare type ViewBaseForParameter = {
10
+ type ViewBaseForParameter = {
11
11
  index: string | number;
12
12
  name?: string;
13
13
  filterCond?: string;
14
14
  sort?: string;
15
15
  };
16
- declare type AdditionalPropertyForResponse = {
16
+ type AdditionalPropertyForResponse = {
17
17
  LIST: {
18
18
  fields: string[];
19
19
  };
@@ -27,7 +27,7 @@ declare type AdditionalPropertyForResponse = {
27
27
  device: "DESKTOP" | "ANY";
28
28
  };
29
29
  };
30
- declare type AdditionalPropertyForParameter = {
30
+ type AdditionalPropertyForParameter = {
31
31
  LIST: {
32
32
  fields?: string[];
33
33
  };
@@ -41,10 +41,10 @@ declare type AdditionalPropertyForParameter = {
41
41
  device?: "DESKTOP" | "ANY";
42
42
  };
43
43
  };
44
- export declare type ViewForResponse<U extends ViewType = ViewType> = U extends ViewType ? ViewBaseForResponse & {
44
+ export type ViewForResponse<U extends ViewType = ViewType> = U extends ViewType ? ViewBaseForResponse & {
45
45
  type: U;
46
46
  } & AdditionalPropertyForResponse[U] : never;
47
- export declare type ViewForParameter<U extends ViewType = ViewType> = U extends ViewType ? ViewBaseForParameter & {
47
+ export type ViewForParameter<U extends ViewType = ViewType> = U extends ViewType ? ViewBaseForParameter & {
48
48
  type: U;
49
49
  } & AdditionalPropertyForParameter[U] : never;
50
50
  export {};
@@ -1,5 +1,5 @@
1
- declare type EntityType = "USER" | "GROUP" | "ORGANIZATION";
2
- export declare type Entity = {
1
+ type EntityType = "USER" | "GROUP" | "ORGANIZATION";
2
+ export type Entity = {
3
3
  type: EntityType;
4
4
  code: string;
5
5
  };
@@ -1,5 +1,5 @@
1
- export declare type AppID = string | number;
2
- export declare type RecordID = string | number;
3
- export declare type Revision = string | number;
1
+ export type AppID = string | number;
2
+ export type RecordID = string | number;
3
+ export type Revision = string | number;
4
4
  export * from "./record";
5
5
  export * from "./app";
@@ -1,16 +1,16 @@
1
1
  import type { OneOf as Field } from "../../../KintoneFields/types/field";
2
- export declare type Record = {
2
+ export type Record = {
3
3
  [fieldCode: string]: Field;
4
4
  };
5
- export declare type UpdateKey = {
5
+ export type UpdateKey = {
6
6
  field: string;
7
7
  value: string | number;
8
8
  };
9
- export declare type Mention = {
9
+ export type Mention = {
10
10
  code: string;
11
11
  type: "USER" | "GROUP" | "ORGANIZATION";
12
12
  };
13
- export declare type Comment = {
13
+ export type Comment = {
14
14
  id: string;
15
15
  text: string;
16
16
  createdAt: string;
@@ -20,4 +20,4 @@ export declare type Comment = {
20
20
  };
21
21
  mentions: Mention[];
22
22
  };
23
- export declare type CommentID = string | number;
23
+ export type CommentID = string | number;
@@ -1,15 +1,15 @@
1
1
  import type { ErrorResponse } from "../http/HttpClientInterface";
2
- declare type SingleErrorResponseData = {
2
+ type SingleErrorResponseData = {
3
3
  id: string;
4
4
  code: string;
5
5
  message: string;
6
6
  errors?: any;
7
7
  };
8
- declare type BulkRequestErrorResponseData = {
8
+ type BulkRequestErrorResponseData = {
9
9
  results: Array<SingleErrorResponseData | {}>;
10
10
  };
11
- declare type KintoneErrorResponseData = SingleErrorResponseData | BulkRequestErrorResponseData;
12
- export declare type KintoneErrorResponse = ErrorResponse<KintoneErrorResponseData>;
11
+ type KintoneErrorResponseData = SingleErrorResponseData | BulkRequestErrorResponseData;
12
+ export type KintoneErrorResponse = ErrorResponse<KintoneErrorResponseData>;
13
13
  export declare class KintoneRestAPIError extends Error {
14
14
  id: string;
15
15
  code: string;
@@ -25,7 +25,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
25
25
  function verb(n) { return function (v) { return step([n, v]); }; }
26
26
  function step(op) {
27
27
  if (f) throw new TypeError("Generator is already executing.");
28
- while (_) try {
28
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
29
29
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
30
30
  if (y = 0, t) op = [op[0] & 2, t.value];
31
31
  switch (op[0]) {
@@ -7,21 +7,21 @@ export interface HttpClient {
7
7
  put: <T extends object>(path: string, params: object) => Promise<T>;
8
8
  delete: <T extends object>(path: string, params: object) => Promise<T>;
9
9
  }
10
- export declare type ErrorResponse<T = any> = {
10
+ export type ErrorResponse<T = any> = {
11
11
  data: T;
12
12
  status: number;
13
13
  statusText: string;
14
14
  headers: any;
15
15
  };
16
- export declare type Response<T = any> = {
16
+ export type Response<T = any> = {
17
17
  data: T;
18
18
  headers: any;
19
19
  };
20
- export declare type HttpMethod = "get" | "post" | "put" | "delete";
21
- export declare type Params = {
20
+ export type HttpMethod = "get" | "post" | "put" | "delete";
21
+ export type Params = {
22
22
  [key: string]: unknown;
23
23
  };
24
- export declare type ProxyConfig = {
24
+ export type ProxyConfig = {
25
25
  host: string;
26
26
  port: number;
27
27
  auth?: {
@@ -35,7 +35,7 @@ export interface HttpClientError<T = ErrorResponse> extends Error {
35
35
  export interface ResponseHandler {
36
36
  handle: <T = any>(response: Promise<Response<T>>) => Promise<T>;
37
37
  }
38
- export declare type RequestConfig = {
38
+ export type RequestConfig = {
39
39
  method: HttpMethod;
40
40
  url: string;
41
41
  headers: any;
@@ -1,7 +1,7 @@
1
1
  import type { HttpClient, RequestConfigBuilder, ResponseHandler } from "./HttpClientInterface";
2
2
  import type FormData from "form-data";
3
3
  import { KintoneResponseHandler } from "../KintoneResponseHandler";
4
- declare type Log = {
4
+ type Log = {
5
5
  method: "get" | "post" | "put" | "delete";
6
6
  path: string;
7
7
  params: {
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -1,4 +1,4 @@
1
- declare type Platform = "Browser" | "Node.js";
1
+ type Platform = "Browser" | "Node.js";
2
2
  export declare class UnsupportedPlatformError extends Error {
3
3
  platform: Platform;
4
4
  constructor(platform: Platform);
@@ -1 +1,4 @@
1
+ /**
2
+ * @jest-environment jsdom
3
+ */
1
4
  export {};
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ /**
3
+ * @jest-environment jsdom
4
+ */
2
5
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
6
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
7
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -14,7 +17,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
17
  function verb(n) { return function (v) { return step([n, v]); }; }
15
18
  function step(op) {
16
19
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
20
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
21
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
22
  if (y = 0, t) op = [op[0] & 2, t.value];
20
23
  switch (op[0]) {
@@ -99,4 +102,10 @@ describe("getRequestToken()", function () {
99
102
  });
100
103
  }); });
101
104
  });
105
+ describe("buildFormDataValue", function () {
106
+ it("should detect MIME type correctly (PDF)", function () {
107
+ var blob = (0, browser_1.buildFormDataValue)("dummy data", "attachment/input.pdf");
108
+ expect(blob.type).toBe("application/pdf");
109
+ });
110
+ });
102
111
  //# sourceMappingURL=browser.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser.test.js","sourceRoot":"","sources":["../../../src/platform/__tests__/browser.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAA6C;AAE7C,QAAQ,CAAC,mBAAmB,EAAE;IAC5B,IAAI,eAAoB,CAAC;IACzB,IAAI,cAAmB,CAAC;IACxB,UAAU,CAAC;QACT,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;QAC/B,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,SAAS,CAAC;QACR,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC;QAC/B,MAAM,CAAC,OAAO,GAAG,eAAe,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,uCAAuC,EAAE;;;;;oBACpC,KAAK,GAAG,kCAAkC,CAAC;oBACjD,MAAM,CAAC,OAAO,GAAG;wBACf,eAAe,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;qBAC7B,CAAC;oBACmB,qBAAM,IAAA,yBAAe,GAAE,EAAA;;oBAAtC,YAAY,GAAG,SAAuB;oBAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;SAClC,CAAC,CAAC;IACH,EAAE,CAAC,sCAAsC,EAAE;;;;;oBACnC,KAAK,GAAG,iCAAiC,CAAC;oBAChD,MAAM,CAAC,MAAM,GAAG;wBACd,OAAO,EAAE;4BACP,OAAO,EAAE;gCACP,eAAe,EAAE;oCAAY,sBAAA,KAAK,EAAA;yCAAA;6BACnC;yBACF;qBACF,CAAC;oBACmB,qBAAM,IAAA,yBAAe,GAAE,EAAA;;oBAAtC,YAAY,GAAG,SAAuB;oBAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;SAClC,CAAC,CAAC;IACH,EAAE,CAAC,wCAAwC,EAAE;;;wBAC3C,qBAAM,MAAM,CAAC,IAAA,yBAAe,GAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAC7C,qDAAqD,CACtD,EAAA;;oBAFD,SAEC,CAAC;;;;SACH,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"browser.test.js","sourceRoot":"","sources":["../../../src/platform/__tests__/browser.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,sCAAiE;AAEjE,QAAQ,CAAC,mBAAmB,EAAE;IAC5B,IAAI,eAAoB,CAAC;IACzB,IAAI,cAAmB,CAAC;IACxB,UAAU,CAAC;QACT,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC;QAC/B,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,SAAS,CAAC;QACR,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC;QAC/B,MAAM,CAAC,OAAO,GAAG,eAAe,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,uCAAuC,EAAE;;;;;oBACpC,KAAK,GAAG,kCAAkC,CAAC;oBACjD,MAAM,CAAC,OAAO,GAAG;wBACf,eAAe,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;qBAC7B,CAAC;oBACmB,qBAAM,IAAA,yBAAe,GAAE,EAAA;;oBAAtC,YAAY,GAAG,SAAuB;oBAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;SAClC,CAAC,CAAC;IACH,EAAE,CAAC,sCAAsC,EAAE;;;;;oBACnC,KAAK,GAAG,iCAAiC,CAAC;oBAChD,MAAM,CAAC,MAAM,GAAG;wBACd,OAAO,EAAE;4BACP,OAAO,EAAE;gCACP,eAAe,EAAE;oCAAY,sBAAA,KAAK,EAAA;yCAAA;6BACnC;yBACF;qBACF,CAAC;oBACmB,qBAAM,IAAA,yBAAe,GAAE,EAAA;;oBAAtC,YAAY,GAAG,SAAuB;oBAC5C,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;;;;SAClC,CAAC,CAAC;IACH,EAAE,CAAC,wCAAwC,EAAE;;;wBAC3C,qBAAM,MAAM,CAAC,IAAA,yBAAe,GAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAC7C,qDAAqD,CACtD,EAAA;;oBAFD,SAEC,CAAC;;;;SACH,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,oBAAoB,EAAE;IAC7B,EAAE,CAAC,yCAAyC,EAAE;QAC5C,IAAM,IAAI,GAAG,IAAA,4BAAkB,EAAC,YAAY,EAAE,sBAAsB,CAAC,CAAC;QACtE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -1,5 +1,5 @@
1
1
  import type { DiscriminatedAuth } from "../types/auth";
2
- declare type PlatformDeps = {
2
+ type PlatformDeps = {
3
3
  readFileFromPath: (filePath: string) => Promise<{
4
4
  name: string;
5
5
  data: unknown;
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -1,21 +1,21 @@
1
- declare type ApiTokenAuth = {
1
+ type ApiTokenAuth = {
2
2
  type: "apiToken";
3
3
  apiToken: string | string[];
4
4
  };
5
- declare type PasswordAuth = {
5
+ type PasswordAuth = {
6
6
  type: "password";
7
7
  username: string;
8
8
  password: string;
9
9
  };
10
- declare type SessionAuth = {
10
+ type SessionAuth = {
11
11
  type: "session";
12
12
  };
13
- declare type OAuthTokenAuth = {
13
+ type OAuthTokenAuth = {
14
14
  type: "oAuthToken";
15
15
  oAuthToken: string;
16
16
  };
17
- export declare type DiscriminatedAuth = ApiTokenAuth | PasswordAuth | SessionAuth | OAuthTokenAuth;
18
- export declare type BasicAuth = {
17
+ export type DiscriminatedAuth = ApiTokenAuth | PasswordAuth | SessionAuth | OAuthTokenAuth;
18
+ export type BasicAuth = {
19
19
  username: string;
20
20
  password: string;
21
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kintone/rest-api-client",
3
- "version": "3.3.3",
3
+ "version": "3.3.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -91,5 +91,5 @@
91
91
  },
92
92
  "./package.json": "./package.json"
93
93
  },
94
- "gitHead": "d850ab5592a19bd69d87f5c3d02347782089bab8"
94
+ "gitHead": "acccbcd47eb4168894fceb7962ee8f407d37b29e"
95
95
  }