@jinshuju/cli 0.10.0 → 0.12.0
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.
- package/README.md +10 -1
- package/dist/commands/account.js +9 -10
- package/dist/commands/checkin.d.ts +2 -0
- package/dist/commands/checkin.js +117 -0
- package/dist/commands/comment.js +10 -11
- package/dist/commands/entry.js +89 -87
- package/dist/commands/field.js +18 -26
- package/dist/commands/fill.d.ts +1 -3
- package/dist/commands/fill.js +17 -9
- package/dist/commands/folder.js +5 -8
- package/dist/commands/form.js +52 -65
- package/dist/commands/index.js +17 -0
- package/dist/commands/opensearch.js +8 -13
- package/dist/commands/shared.d.ts +13 -4
- package/dist/commands/shared.js +12 -8
- package/dist/commands/sms.js +2 -2
- package/dist/commands/table.js +17 -27
- package/dist/commands/trade.js +48 -43
- package/dist/commands/upload.d.ts +9 -2
- package/dist/commands/upload.js +9 -4
- package/dist/commands/view.js +9 -13
- package/dist/generated/operations.d.ts +11 -0
- package/dist/generated/operations.js +4003 -0
- package/dist/options.d.ts +7 -2
- package/dist/options.js +7 -5
- package/dist/spec.d.ts +105 -0
- package/dist/spec.js +201 -0
- package/package.json +8 -4
package/dist/commands/table.js
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
import { FILTER_OPTION, FILTERS_OPTION, JSON_OPTION, PAGINATION_OPTIONS, SORT_OPTION } from '../options.js';
|
|
2
|
-
import {
|
|
2
|
+
import { bodyChoices, call } from '../spec.js';
|
|
3
|
+
import { FOLDER_OPTION, LISTING, filters, keywords, overriding, paging, payload, sort } from './shared.js';
|
|
3
4
|
import { validateContainerPayload } from '../payload.js';
|
|
4
5
|
/**
|
|
5
6
|
* The field types a table column may be, which is a third of what a form takes.
|
|
6
7
|
* Worth naming in the help rather than leaving to a rejected create: the absence
|
|
7
8
|
* of TextField is the one nobody guesses.
|
|
8
9
|
*/
|
|
9
|
-
const TABLE_FIELD_TYPES = [
|
|
10
|
-
'TextArea',
|
|
11
|
-
'RadioButton',
|
|
12
|
-
'CheckBox',
|
|
13
|
-
'BooleanField',
|
|
14
|
-
'MobileField',
|
|
15
|
-
'NumberField',
|
|
16
|
-
'DateTimeField',
|
|
17
|
-
'EmailField',
|
|
18
|
-
'LinkField',
|
|
19
|
-
'AttachmentField',
|
|
20
|
-
'FormulaField'
|
|
21
|
-
];
|
|
10
|
+
const TABLE_FIELD_TYPES = bodyChoices('createTable', 'fields[].type');
|
|
22
11
|
export const TABLE = [
|
|
23
12
|
{
|
|
24
13
|
path: ['table', 'list'],
|
|
@@ -36,10 +25,13 @@ export const TABLE = [
|
|
|
36
25
|
SORT_OPTION,
|
|
37
26
|
...PAGINATION_OPTIONS
|
|
38
27
|
],
|
|
39
|
-
request: (input) => ({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
request: (input) => call('listTables', {
|
|
29
|
+
query: {
|
|
30
|
+
q: keywords(input.options.name),
|
|
31
|
+
filters: filters(input),
|
|
32
|
+
sort: sort(input, 'field'),
|
|
33
|
+
...paging(input)
|
|
34
|
+
}
|
|
43
35
|
}),
|
|
44
36
|
paginate: LISTING,
|
|
45
37
|
examples: ['jinshuju table list --name 台账', 'jinshuju entry list --table Vn4xR8']
|
|
@@ -48,14 +40,15 @@ export const TABLE = [
|
|
|
48
40
|
path: ['table', 'get'],
|
|
49
41
|
summary: 'Show a table: columns, types, choices',
|
|
50
42
|
args: [{ name: 'table', required: true, description: 'Table token, six letters and digits, e.g. Vn4xR8' }],
|
|
51
|
-
request: (input) => (
|
|
43
|
+
request: (input) => call('getTable', { path: { table_token: input.args.table } }),
|
|
52
44
|
examples: ['jinshuju table get Vn4xR8']
|
|
53
45
|
},
|
|
54
46
|
{
|
|
55
47
|
path: ['table', 'create'],
|
|
56
48
|
summary: 'Create a table',
|
|
57
49
|
description: 'Column types use the API v1 names, but a table takes fewer of them than a form: ' +
|
|
58
|
-
`${TABLE_FIELD_TYPES
|
|
50
|
+
`${TABLE_FIELD_TYPES?.join(', ') ?? 'see `jinshuju field types --kind table`'}. ` +
|
|
51
|
+
'There is no TextField — a single line of text is a ' +
|
|
59
52
|
'TextArea here. Do not pass api_code: the backend generates it.',
|
|
60
53
|
options: [
|
|
61
54
|
JSON_OPTION,
|
|
@@ -66,9 +59,7 @@ export const TABLE = [
|
|
|
66
59
|
description: 'Seed a few blank rows, as the UI does. Leave it off when rows follow'
|
|
67
60
|
}
|
|
68
61
|
],
|
|
69
|
-
request: (input) => ({
|
|
70
|
-
method: 'POST',
|
|
71
|
-
path: `${API}/tables`,
|
|
62
|
+
request: (input) => call('createTable', {
|
|
72
63
|
body: overriding(validateContainerPayload(payload(input), 'table'), {
|
|
73
64
|
folder_token: input.options.folder,
|
|
74
65
|
with_default_entries: input.options.with_default_entries ? true : undefined
|
|
@@ -82,9 +73,8 @@ export const TABLE = [
|
|
|
82
73
|
description: 'The folder must be a table folder; a form folder cannot hold a table.',
|
|
83
74
|
args: [{ name: 'table', required: true, description: 'Table token' }],
|
|
84
75
|
options: [FOLDER_OPTION],
|
|
85
|
-
request: (input) => ({
|
|
86
|
-
|
|
87
|
-
path: `${API}/tables/${input.args.table}/folder`,
|
|
76
|
+
request: (input) => call('moveTableToFolder', {
|
|
77
|
+
path: { table_token: input.args.table },
|
|
88
78
|
body: { folder_token: input.options.folder ?? '' }
|
|
89
79
|
}),
|
|
90
80
|
examples: ['jinshuju table move Vn4xR8 --folder Nf7mDC', 'jinshuju table move Vn4xR8']
|
|
@@ -96,6 +86,6 @@ export const TABLE = [
|
|
|
96
86
|
'fields: {add, update, update_choices, remove}.',
|
|
97
87
|
args: [{ name: 'table', required: true, description: 'Table token' }],
|
|
98
88
|
options: [JSON_OPTION],
|
|
99
|
-
request: (input) => (
|
|
89
|
+
request: (input) => call('updateTable', { path: { table_token: input.args.table }, body: payload(input) })
|
|
100
90
|
}
|
|
101
91
|
];
|
package/dist/commands/trade.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { PAGINATION_OPTIONS } from '../options.js';
|
|
2
|
-
import {
|
|
2
|
+
import { call, choices } from '../spec.js';
|
|
3
|
+
import { paging } from './shared.js';
|
|
3
4
|
/**
|
|
4
5
|
* The account's 小金商户: what its payment forms collected, refunded and paid
|
|
5
6
|
* out. An account collecting through its own bound WeChat / Alipay merchant
|
|
6
7
|
* (直连) has none of this in 金数据, and the reads below say so rather than
|
|
7
8
|
* answering with zeroes.
|
|
8
9
|
*/
|
|
9
|
-
const PAID_STATUSES = ['paid', 'unpaid', 'refunded', 'refunding', 'partial_refunded'];
|
|
10
|
-
const RECORD_STATUSES = ['processing', 'success', 'error'];
|
|
11
10
|
const DATE_OPTIONS = [
|
|
12
11
|
{
|
|
13
12
|
name: '--from',
|
|
@@ -17,33 +16,53 @@ const DATE_OPTIONS = [
|
|
|
17
16
|
},
|
|
18
17
|
{ name: '--to', type: 'string', placeholder: '<YYYY-MM-DD>', description: 'Last day, inclusive; give it with --from' }
|
|
19
18
|
];
|
|
20
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The CLI spells a dimension as its flag is spelled; the API names it by its
|
|
21
|
+
* parameter, and the spec says which of those it groups by.
|
|
22
|
+
*/
|
|
21
23
|
const GROUP_BY = { time: 'time', 'paid-status': 'paid_status', channel: 'payment_channel' };
|
|
22
24
|
const ORDER_FILTER_OPTIONS = [
|
|
23
25
|
{
|
|
24
26
|
name: '--status',
|
|
25
27
|
type: 'string',
|
|
26
28
|
repeatable: true,
|
|
27
|
-
choices:
|
|
29
|
+
choices: choices('listTradeTransactions', 'paid_status'),
|
|
28
30
|
placeholder: '<status>',
|
|
29
31
|
description: 'Keep only these payment statuses, repeatable. Omitted, every status, unpaid included'
|
|
30
32
|
},
|
|
31
33
|
{
|
|
32
34
|
name: '--channel',
|
|
33
35
|
type: 'string',
|
|
34
|
-
choices:
|
|
36
|
+
choices: choices('listTradeTransactions', 'payment_channel'),
|
|
35
37
|
placeholder: '<channel>',
|
|
36
|
-
description: 'Keep only orders paid through this channel: wxpay (
|
|
38
|
+
description: 'Keep only orders paid through this channel: wxpay (WeChat Pay) or alipay (Alipay)'
|
|
37
39
|
},
|
|
38
40
|
{ name: '--form', type: 'string', placeholder: '<token>', description: 'Keep only orders of this payment form' }
|
|
39
41
|
];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
/**
|
|
43
|
+
* What a refund or payout listing carries, as the operation behind it allows.
|
|
44
|
+
* The lookup is spelled out at each call, because scripts/spec-diff.mjs reads
|
|
45
|
+
* it off the source to tell whether a spec change moved what a flag offers.
|
|
46
|
+
*/
|
|
47
|
+
function includeOption(values) {
|
|
48
|
+
return {
|
|
49
|
+
name: '--include',
|
|
50
|
+
type: 'string',
|
|
51
|
+
choices: values,
|
|
52
|
+
placeholder: '<what>',
|
|
53
|
+
description: 'both (default), stats for the statistics alone, or records for the rows alone'
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** Which state a refund or a payout is in, as the operation behind it names them. */
|
|
57
|
+
function recordStatusOption(values, what) {
|
|
58
|
+
return {
|
|
59
|
+
name: '--status',
|
|
60
|
+
type: 'string',
|
|
61
|
+
choices: values,
|
|
62
|
+
placeholder: '<status>',
|
|
63
|
+
description: `Keep only ${what} in this state`
|
|
64
|
+
};
|
|
65
|
+
}
|
|
47
66
|
const DETAIL_LIMITS = 'Rows are capped at 90 days and 200 matching records per query; past either, no rows come back, ' +
|
|
48
67
|
'only detail_limit and the stats for the whole range. Narrow the range rather than splitting it.';
|
|
49
68
|
function dates(input) {
|
|
@@ -66,7 +85,7 @@ export const TRADE = [
|
|
|
66
85
|
summary: 'Show the 小金商户: where onboarding stands, balance, rate and settlement account',
|
|
67
86
|
description: 'Answers without a merchant too: merchant_stage says where the application stands. Bank card, phone, ' +
|
|
68
87
|
'email and ID numbers come back masked, as the product shows them.',
|
|
69
|
-
request: () => (
|
|
88
|
+
request: () => call('getTradeMerchant')
|
|
70
89
|
},
|
|
71
90
|
{
|
|
72
91
|
path: ['transaction', 'list'],
|
|
@@ -81,13 +100,12 @@ export const TRADE = [
|
|
|
81
100
|
name: '--order-no',
|
|
82
101
|
type: 'string',
|
|
83
102
|
placeholder: '<no>',
|
|
84
|
-
description: 'Exact match on
|
|
103
|
+
description: 'Exact match on the transaction number (trade_no), the merchant order number ' +
|
|
104
|
+
'(merchant_out_trade_no) or the Jinshuju order number (out_trade_no)'
|
|
85
105
|
},
|
|
86
106
|
...PAGINATION_OPTIONS
|
|
87
107
|
],
|
|
88
|
-
request: (input) => ({
|
|
89
|
-
method: 'GET',
|
|
90
|
-
path: `${API}/trade/transactions`,
|
|
108
|
+
request: (input) => call('listTradeTransactions', {
|
|
91
109
|
query: {
|
|
92
110
|
...dates(input),
|
|
93
111
|
...orderFilters(input),
|
|
@@ -117,9 +135,7 @@ export const TRADE = [
|
|
|
117
135
|
},
|
|
118
136
|
...ORDER_FILTER_OPTIONS
|
|
119
137
|
],
|
|
120
|
-
request: (input) => ({
|
|
121
|
-
method: 'GET',
|
|
122
|
-
path: `${API}/trade/transactions/aggregate`,
|
|
138
|
+
request: (input) => call('aggregateTradeTransactions', {
|
|
123
139
|
query: { ...dates(input), group_by: GROUP_BY[input.options.group_by], ...orderFilters(input) }
|
|
124
140
|
}),
|
|
125
141
|
examples: ['jinshuju transaction aggregate --from 2026-09-01 --to 2026-09-28 --group-by channel']
|
|
@@ -130,20 +146,17 @@ export const TRADE = [
|
|
|
130
146
|
description: 'Defaults to the last 90 days; --refund-no alone searches all time. ' + DETAIL_LIMITS,
|
|
131
147
|
options: [
|
|
132
148
|
...DATE_OPTIONS,
|
|
149
|
+
recordStatusOption(choices('listTradeRefunds', 'status'), 'refunds'),
|
|
133
150
|
{
|
|
134
|
-
name: '--
|
|
151
|
+
name: '--refund-no',
|
|
135
152
|
type: 'string',
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
description: 'Keep only refunds in this state'
|
|
153
|
+
placeholder: '<no>',
|
|
154
|
+
description: 'Exact match on the refund number (refund_no)'
|
|
139
155
|
},
|
|
140
|
-
|
|
141
|
-
INCLUDE_OPTION,
|
|
156
|
+
includeOption(choices('listTradeRefunds', 'include')),
|
|
142
157
|
...PAGINATION_OPTIONS
|
|
143
158
|
],
|
|
144
|
-
request: (input) => ({
|
|
145
|
-
method: 'GET',
|
|
146
|
-
path: `${API}/trade/refunds`,
|
|
159
|
+
request: (input) => call('listTradeRefunds', {
|
|
147
160
|
query: {
|
|
148
161
|
...dates(input),
|
|
149
162
|
status: input.options.status,
|
|
@@ -156,23 +169,15 @@ export const TRADE = [
|
|
|
156
169
|
},
|
|
157
170
|
{
|
|
158
171
|
path: ['payout', 'list'],
|
|
159
|
-
summary: 'List payouts
|
|
172
|
+
summary: 'List payouts to the settlement account, with their statistics',
|
|
160
173
|
description: 'Defaults to the last 90 days. ' + DETAIL_LIMITS,
|
|
161
174
|
options: [
|
|
162
175
|
...DATE_OPTIONS,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
type: 'string',
|
|
166
|
-
choices: RECORD_STATUSES,
|
|
167
|
-
placeholder: '<status>',
|
|
168
|
-
description: 'Keep only payouts in this state'
|
|
169
|
-
},
|
|
170
|
-
INCLUDE_OPTION,
|
|
176
|
+
recordStatusOption(choices('listTradePayouts', 'status'), 'payouts'),
|
|
177
|
+
includeOption(choices('listTradePayouts', 'include')),
|
|
171
178
|
...PAGINATION_OPTIONS
|
|
172
179
|
],
|
|
173
|
-
request: (input) => ({
|
|
174
|
-
method: 'GET',
|
|
175
|
-
path: `${API}/trade/payouts`,
|
|
180
|
+
request: (input) => call('listTradePayouts', {
|
|
176
181
|
query: {
|
|
177
182
|
...dates(input),
|
|
178
183
|
status: input.options.status,
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import type { HttpClient, HttpRequest } from '../http.js';
|
|
2
|
+
import { type OperationId } from '../spec.js';
|
|
3
|
+
/**
|
|
4
|
+
* What the CLI uploads a form image as. A test holds the list to the spec's
|
|
5
|
+
* `image_type`, which is where it would otherwise drift.
|
|
6
|
+
*/
|
|
7
|
+
export declare const FORM_IMAGE_TYPES: readonly ["description", "header", "wallpaper", "opensearch_header"];
|
|
8
|
+
export type FormImageType = (typeof FORM_IMAGE_TYPES)[number];
|
|
2
9
|
/**
|
|
3
10
|
* A file on disk, as multipart. The three endpoints that take one authenticate
|
|
4
11
|
* like every other request, so there is no ticket to fetch first: the file goes
|
|
5
12
|
* up in one call and comes back with an id to refer to it by.
|
|
6
13
|
*/
|
|
7
|
-
export declare function upload(path: string, file: string, extra?: Record<string, string>): HttpRequest;
|
|
14
|
+
export declare function upload(id: OperationId, path: Record<string, string>, file: string, extra?: Record<string, string>): HttpRequest;
|
|
8
15
|
/**
|
|
9
16
|
* An image that a form's theme or one of its public queries refers to by id, uploaded
|
|
10
17
|
* with `imageType` saying which (header, wallpaper, opensearch_header).
|
|
11
18
|
*/
|
|
12
|
-
export declare function uploadFormImage(client: HttpClient, file: string, imageType:
|
|
19
|
+
export declare function uploadFormImage(client: HttpClient, file: string, imageType: FormImageType): Promise<string>;
|
package/dist/commands/upload.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UsageError } from '../options.js';
|
|
2
2
|
import { progress } from '../progress.js';
|
|
3
|
-
import {
|
|
3
|
+
import { call } from '../spec.js';
|
|
4
4
|
import { readFileSync } from 'node:fs';
|
|
5
5
|
import { basename, extname } from 'node:path';
|
|
6
6
|
/**
|
|
@@ -20,12 +20,17 @@ const UPLOAD_TYPES = {
|
|
|
20
20
|
'.webp': 'image/webp',
|
|
21
21
|
'.pdf': 'application/pdf'
|
|
22
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* What the CLI uploads a form image as. A test holds the list to the spec's
|
|
25
|
+
* `image_type`, which is where it would otherwise drift.
|
|
26
|
+
*/
|
|
27
|
+
export const FORM_IMAGE_TYPES = ['description', 'header', 'wallpaper', 'opensearch_header'];
|
|
23
28
|
/**
|
|
24
29
|
* A file on disk, as multipart. The three endpoints that take one authenticate
|
|
25
30
|
* like every other request, so there is no ticket to fetch first: the file goes
|
|
26
31
|
* up in one call and comes back with an id to refer to it by.
|
|
27
32
|
*/
|
|
28
|
-
export function upload(path, file, extra = {}) {
|
|
33
|
+
export function upload(id, path, file, extra = {}) {
|
|
29
34
|
const form = new FormData();
|
|
30
35
|
let bytes;
|
|
31
36
|
try {
|
|
@@ -38,7 +43,7 @@ export function upload(path, file, extra = {}) {
|
|
|
38
43
|
form.append('file', new Blob([new Uint8Array(bytes)], type ? { type } : undefined), basename(file));
|
|
39
44
|
for (const [name, value] of Object.entries(extra))
|
|
40
45
|
form.append(name, value);
|
|
41
|
-
return {
|
|
46
|
+
return call(id, { path, form });
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
44
49
|
* An image that a form's theme or one of its public queries refers to by id, uploaded
|
|
@@ -48,7 +53,7 @@ export async function uploadFormImage(client, file, imageType) {
|
|
|
48
53
|
const watching = progress();
|
|
49
54
|
watching.step(`uploading ${basename(file)}…`);
|
|
50
55
|
try {
|
|
51
|
-
const uploaded = await client.request(upload(
|
|
56
|
+
const uploaded = await client.request(upload('uploadFormImage', {}, file, { image_type: imageType }));
|
|
52
57
|
return uploaded.attachment_id;
|
|
53
58
|
}
|
|
54
59
|
finally {
|
package/dist/commands/view.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CONTAINER_OPTIONS, FILTER_OPTION, FILTERS_OPTION, JSON_OPTION, SORT_OPTION } from '../options.js';
|
|
2
|
-
import {
|
|
2
|
+
import { bodyChoices } from '../spec.js';
|
|
3
|
+
import { YES_OPTION, confirmed, filterConditions, onContainer, overriding, sortRules } from './shared.js';
|
|
3
4
|
/** What `view create` and `view edit` both take, beyond the name. */
|
|
4
5
|
const VIEW_OPTIONS = [
|
|
5
6
|
{
|
|
6
7
|
name: '--type',
|
|
7
8
|
type: 'string',
|
|
8
|
-
choices:
|
|
9
|
+
choices: bodyChoices('createFormView', 'view_type'),
|
|
9
10
|
placeholder: '<type>',
|
|
10
11
|
description: 'View type'
|
|
11
12
|
},
|
|
@@ -29,14 +30,14 @@ export const VIEW = [
|
|
|
29
30
|
path: ['view', 'list'],
|
|
30
31
|
summary: 'List the views of a form or table',
|
|
31
32
|
options: [...CONTAINER_OPTIONS],
|
|
32
|
-
request: (input) => (
|
|
33
|
+
request: (input) => onContainer(input, 'listFormViews', 'listTableViews')
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
path: ['view', 'get'],
|
|
36
37
|
summary: 'Show a view',
|
|
37
38
|
args: [{ name: 'view', required: true, description: 'View token, six letters and digits, e.g. aB3dE9' }],
|
|
38
39
|
options: [...CONTAINER_OPTIONS],
|
|
39
|
-
request: (input) => (
|
|
40
|
+
request: (input) => onContainer(input, 'getFormView', 'getTableView', { path: { view_token: input.args.view } })
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
43
|
path: ['view', 'create'],
|
|
@@ -45,11 +46,7 @@ export const VIEW = [
|
|
|
45
46
|
'Anything without a flag of its own — kanban grouping, visibility — goes through --json.',
|
|
46
47
|
args: [{ name: 'name', required: true, description: 'View name' }],
|
|
47
48
|
options: [...CONTAINER_OPTIONS, ...VIEW_OPTIONS],
|
|
48
|
-
request: (input) => ({
|
|
49
|
-
method: 'POST',
|
|
50
|
-
path: `${containerPath(input)}/views`,
|
|
51
|
-
body: { ...viewBody(input), name: input.args.name }
|
|
52
|
-
}),
|
|
49
|
+
request: (input) => onContainer(input, 'createFormView', 'createTableView', { body: { ...viewBody(input), name: input.args.name } }),
|
|
53
50
|
examples: ["jinshuju view create --form Kp7mQ2 高分 --filter 'field_3 gte 80' --sort created_at:desc"]
|
|
54
51
|
},
|
|
55
52
|
{
|
|
@@ -62,9 +59,8 @@ export const VIEW = [
|
|
|
62
59
|
{ name: '--name', type: 'string', placeholder: '<name>', description: 'Rename the view' },
|
|
63
60
|
...VIEW_OPTIONS
|
|
64
61
|
],
|
|
65
|
-
request: (input) => ({
|
|
66
|
-
|
|
67
|
-
path: `${containerPath(input)}/views/${input.args.view}`,
|
|
62
|
+
request: (input) => onContainer(input, 'updateFormView', 'updateTableView', {
|
|
63
|
+
path: { view_token: input.args.view },
|
|
68
64
|
body: overriding(viewBody(input), { name: input.options.name })
|
|
69
65
|
})
|
|
70
66
|
},
|
|
@@ -75,7 +71,7 @@ export const VIEW = [
|
|
|
75
71
|
options: [...CONTAINER_OPTIONS, YES_OPTION],
|
|
76
72
|
request: (input) => {
|
|
77
73
|
confirmed(input, `Deleting view ${input.args.view}`);
|
|
78
|
-
return
|
|
74
|
+
return onContainer(input, 'deleteFormView', 'deleteTableView', { path: { view_token: input.args.view } });
|
|
79
75
|
}
|
|
80
76
|
}
|
|
81
77
|
];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Operation, Schema } from '../spec.js';
|
|
2
|
+
/** The path every operation's path is relative to, from `servers`. */
|
|
3
|
+
export declare const BASE_PATH = "/api/v1";
|
|
4
|
+
export type OperationId = 'aggregateEntries' | 'aggregateFormViewEntries' | 'aggregateTableEntries' | 'aggregateTableViewEntries' | 'aggregateTradeTransactions' | 'checkFormFieldData' | 'checkTableFieldData' | 'copyForm' | 'countEntries' | 'countEntriesAcrossForms' | 'countFormViewEntries' | 'countTableEntries' | 'countTableViewEntries' | 'createCheckinCampaign' | 'createEntriesBatch' | 'createEntry' | 'createEntryComment' | 'createEntryImport' | 'createEntryLegacy' | 'createFillFormEntry' | 'createFillViewEntry' | 'createFolder' | 'createForm' | 'createFormView' | 'createFormWebhook' | 'createOpensearchQuery' | 'createPredefinedChoicesSet' | 'createTable' | 'createTableEntry' | 'createTableEntryComment' | 'createTableView' | 'createTemplateUsage' | 'createWeixinOauthSession' | 'deleteCheckinCampaign' | 'deleteEntry' | 'deleteEntryComment' | 'deleteFormView' | 'deleteFormWebhook' | 'deletePredefinedChoicesSet' | 'deleteTable' | 'deleteTableEntry' | 'deleteTableEntryComment' | 'deleteTableView' | 'getBillingAccount' | 'getCheckinCampaign' | 'getCurrentUser' | 'getEntry' | 'getEntryImport' | 'getEntryStats' | 'getEvaluationSetting' | 'getExamSetting' | 'getFieldType' | 'getFillFormPage' | 'getFillViewPage' | 'getForm' | 'getFormSetting' | 'getFormView' | 'getManuallyCloseRule' | 'getOpensearchQuery' | 'getTable' | 'getTableEntry' | 'getTableView' | 'getTradeMerchant' | 'listBillingAccountInvoices' | 'listBillingAccountPaymentHistories' | 'listBillingAccountUsers' | 'listCheckinCampaigns' | 'listContacts' | 'listEntries' | 'listEntryComments' | 'listExtendedAttributes' | 'listFieldRules' | 'listFieldTypes' | 'listFolders' | 'listFormCooperators' | 'listFormViewEntries' | 'listFormViews' | 'listForms' | 'listMyFilledForms' | 'listMySubmittedEntries' | 'listOpensearchQueries' | 'listOpensearchQuerySuggestions' | 'listPredefinedChoicesSets' | 'listSmsAuditStatuses' | 'listTableEntries' | 'listTableEntryComments' | 'listTableViewEntries' | 'listTableViews' | 'listTables' | 'listTradePayouts' | 'listTradeRefunds' | 'listTradeTransactions' | 'moveFormToFolder' | 'moveTableToFolder' | 'patchEntriesBatch' | 'previewFormFieldTypeChange' | 'previewTableFieldTypeChange' | 'replaceEntry' | 'replaceTableEntry' | 'searchEntriesAcrossForms' | 'searchMySubmittedEntries' | 'summarizeEntries' | 'summarizeFormViewEntries' | 'summarizeTableEntries' | 'summarizeTableViewEntries' | 'updateAccessPolicy' | 'updateCheckinCampaign' | 'updateEntry' | 'updateEntryComment' | 'updateEntryViaPost' | 'updateEvaluationSetting' | 'updateExamSetting' | 'updateForm' | 'updateFormSetting' | 'updateFormTheme' | 'updateFormView' | 'updateManuallyCloseRule' | 'updateOpensearchQuery' | 'updatePredefinedChoicesSet' | 'updateTable' | 'updateTableEntry' | 'updateTableEntryComment' | 'updateTableEntryViaPost' | 'updateTableView' | 'uploadEntryAttachment' | 'uploadFormImage' | 'uploadImportFile' | 'verifyRedirectParams';
|
|
5
|
+
export declare const OPERATIONS: {
|
|
6
|
+
readonly [id in OperationId]: Operation;
|
|
7
|
+
};
|
|
8
|
+
/** The named schemas a parameter or a request body refers to. */
|
|
9
|
+
export declare const SCHEMAS: {
|
|
10
|
+
readonly [name: string]: Schema;
|
|
11
|
+
};
|