@metabase/client 0.1.0 → 0.1.2
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/CHANGELOG.md +25 -0
- package/README.md +10 -6
- package/dist/api-key-DJeN1-7G.d.ts +46 -0
- package/dist/auth/credential.d.ts +1 -1
- package/dist/auth/oauth-login.d.ts +1 -1
- package/dist/auth/oauth-login.js +1 -1
- package/dist/auth/oauth-session.d.ts +1 -1
- package/dist/{card-BZx4NSr-.d.ts → card-CbV6hLYH.d.ts} +4 -4
- package/dist/{card-B6merEUN.d.ts → card-CrSywvOt.d.ts} +18 -18
- package/dist/{client-DNRvXFRm.d.ts → client-cBi6_RQs.d.ts} +289 -185
- package/dist/client.d.ts +1 -1
- package/dist/client.js +4 -0
- package/dist/{collection-Bib61WiV.d.ts → collection-Bmtisr3r.d.ts} +47 -47
- package/dist/{collection-CqtGPi4W.d.ts → collection-Q9FNMiRh.d.ts} +18 -4
- package/dist/{credential-6aOEGqMH.d.ts → credential-B6fKSvqp.d.ts} +1 -1
- package/dist/{dashboard-XTe46250.d.ts → dashboard-CknUcTp8.d.ts} +3 -3
- package/dist/{dashboard-z9i1VUZC.d.ts → dashboard-DBdEehA9.d.ts} +33 -25
- package/dist/{data-action-rS27f2Ji.d.ts → data-action-CqqZ0JYg.d.ts} +6 -4
- package/dist/data-app-MoMS9VUr.d.ts +76 -0
- package/dist/{database-DqTespfa.d.ts → database-Bs5WQOOZ.d.ts} +3 -3
- package/dist/{database-BLUMlywE.d.ts → database-CYNLJ8AZ.d.ts} +18 -18
- package/dist/{dataset-C6lX1-cr.d.ts → dataset-cg8ZZrOP.d.ts} +85 -85
- package/dist/{dataset-Cj3XuKLe.d.ts → dataset-dzWljE_C.d.ts} +3 -3
- package/dist/{dependency-fN5_7a22.d.ts → dependency-CL-YG9KH.d.ts} +26 -26
- package/dist/{dependency-D8Qs5Xdx.d.ts → dependency-VqvLTDAU.d.ts} +248 -196
- package/dist/{document-oZNDbDfx.d.ts → document-tLd6pYWe.d.ts} +2 -2
- package/dist/domain/api-key.d.ts +2 -0
- package/dist/domain/api-key.js +31 -0
- package/dist/domain/card.d.ts +1 -1
- package/dist/domain/collection.d.ts +1 -1
- package/dist/domain/dashboard.d.ts +2 -2
- package/dist/domain/dashboard.js +21 -4
- package/dist/domain/data-action.d.ts +2 -2
- package/dist/domain/data-action.js +8 -2
- package/dist/domain/data-app.d.ts +2 -0
- package/dist/domain/data-app.js +52 -0
- package/dist/domain/database.d.ts +1 -1
- package/dist/domain/dataset.d.ts +1 -1
- package/dist/domain/dependency.d.ts +1 -1
- package/dist/domain/dependency.js +6 -3
- package/dist/domain/document.d.ts +1 -1
- package/dist/domain/eid-translation.d.ts +1 -1
- package/dist/domain/field.d.ts +2 -2
- package/dist/domain/field.js +8 -2
- package/dist/domain/git-sync.d.ts +1 -1
- package/dist/domain/library.d.ts +2 -2
- package/dist/domain/library.js +8 -2
- package/dist/domain/measure.d.ts +1 -1
- package/dist/domain/measure.js +3 -1
- package/dist/domain/metric.d.ts +1 -1
- package/dist/domain/moderation-review.d.ts +1 -1
- package/dist/domain/notification.d.ts +2 -2
- package/dist/domain/notification.js +6 -1
- package/dist/domain/parameter.d.ts +1 -1
- package/dist/domain/pulse.d.ts +2 -2
- package/dist/domain/pulse.js +10 -3
- package/dist/domain/replacement.d.ts +1 -1
- package/dist/domain/revision.d.ts +2 -2
- package/dist/domain/revision.js +29 -2
- package/dist/domain/search.d.ts +1 -1
- package/dist/domain/segment.d.ts +1 -1
- package/dist/domain/segment.js +3 -1
- package/dist/domain/setup.d.ts +1 -1
- package/dist/domain/setup.js +1 -1
- package/dist/domain/snippet.d.ts +1 -1
- package/dist/domain/table.d.ts +2 -2
- package/dist/domain/table.js +35 -4
- package/dist/domain/timeline.d.ts +1 -1
- package/dist/domain/transform-dag-run.d.ts +1 -1
- package/dist/domain/transform-inspector.d.ts +1 -1
- package/dist/domain/transform-job.d.ts +2 -2
- package/dist/domain/transform-job.js +8 -2
- package/dist/domain/transform-python.d.ts +2 -2
- package/dist/domain/transform-python.js +15 -3
- package/dist/domain/transform-tag.d.ts +1 -1
- package/dist/domain/transform-test.d.ts +1 -1
- package/dist/domain/transform.d.ts +2 -2
- package/dist/domain/transform.js +76 -7
- package/dist/domain/user.d.ts +1 -1
- package/dist/domain/user.js +1 -1
- package/dist/{eid-translation-nuhr8St2.d.ts → eid-translation-aQSffx0o.d.ts} +40 -40
- package/dist/{erd-BujD227Y.d.ts → erd-DCgdEC2S.d.ts} +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/{features-CnFkUCj2.d.ts → features-SMSfJhB6.d.ts} +36 -2
- package/dist/{field-Bqn10Fq_.d.ts → field-ozrfbvUd.d.ts} +2 -2
- package/dist/{field-BCRO19mk.d.ts → field-tqQPtVuR.d.ts} +9 -7
- package/dist/{git-sync-gAMKsZgN.d.ts → git-sync-5lFWX1ds.d.ts} +3 -3
- package/dist/{git-sync-DNXrNVCW.d.ts → git-sync-QL9Nu6gP.d.ts} +10 -10
- package/dist/{glossary-CqFlzW33.d.ts → glossary-DwS7QVrl.d.ts} +1 -1
- package/dist/http/errors.d.ts +1 -1
- package/dist/http/oauth.d.ts +1 -1
- package/dist/http/oauth.js +47 -36
- package/dist/http/transport.d.ts +1 -1
- package/dist/index.d.ts +48 -46
- package/dist/index.js +8 -6
- package/dist/input-gate-registry-Dai7SfXb.js +14 -0
- package/dist/input-gates-DwKoTJVQ.d.ts +28 -0
- package/dist/{json-CZvjc3--.d.ts → json-DwGOvRtS.d.ts} +1 -1
- package/dist/json-pointer.d.ts +2 -1
- package/dist/json-pointer.js +4 -1
- package/dist/json.d.ts +1 -1
- package/dist/{library-Cx9h_RkU.d.ts → library-B9pEq7qP.d.ts} +8 -6
- package/dist/{measure-CuMqPbQX.d.ts → measure-CInoXeyH.d.ts} +1 -1
- package/dist/{measure-KuXdjZYJ.d.ts → measure-CgH14YQZ.d.ts} +1 -1
- package/dist/{metric-yvehaVCS.d.ts → metric-CYOmbcM5.d.ts} +10 -10
- package/dist/{moderation-review-B4RUTZ6_.d.ts → moderation-review-CWUQ3_HL.d.ts} +4 -4
- package/dist/{notification-BT2TDAd_.d.ts → notification-BY2JEjKp.d.ts} +68 -4
- package/dist/{notification-BiegPoSD.d.ts → notification-D-Hp82Pn.d.ts} +3 -3
- package/dist/{oauth-C4ordeoJ.d.ts → oauth-CVoZpuq8.d.ts} +4 -2
- package/dist/{oauth-login-D734Jvbq.js → oauth-login--tDagiZu.js} +29 -11
- package/dist/{oauth-login-CJsT_3EE.d.ts → oauth-login-SZ4Csai8.d.ts} +3 -2
- package/dist/{oauth-session-BlIlcd8Q.d.ts → oauth-session-COLH4puN.d.ts} +1 -1
- package/dist/{paginate-DZWvWvbm.d.ts → paginate-CaJ5usdp.d.ts} +1 -1
- package/dist/paginate.d.ts +1 -1
- package/dist/{parameter-ak-J-IOj.d.ts → parameter-BYo7uR-J.d.ts} +2 -2
- package/dist/{pulse-dylocLd9.d.ts → pulse-BTpSNxhT.d.ts} +2 -2
- package/dist/{pulse-CMc1Rwdj.d.ts → pulse-BUlfrJZH.d.ts} +23 -21
- package/dist/{replacement-CyvtbxGg.d.ts → replacement-BQian4vA.d.ts} +23 -23
- package/dist/{replacement-S9U3gApY.d.ts → replacement-Dbtvvrmz.d.ts} +11 -11
- package/dist/{requirement-check-CIA5IHC1.d.ts → requirement-check-CHHEHXcj.d.ts} +2 -2
- package/dist/{requirements-C0txASN8.d.ts → requirements-Dx_ZVzl7.d.ts} +11 -1
- package/dist/resources/api-key.d.ts +11 -0
- package/dist/resources/api-key.js +35 -0
- package/dist/resources/card.d.ts +1 -1
- package/dist/resources/collection.d.ts +1 -1
- package/dist/resources/collection.js +35 -6
- package/dist/resources/content-translation.d.ts +1 -1
- package/dist/resources/content-translation.js +1 -1
- package/dist/resources/dashboard.d.ts +1 -1
- package/dist/resources/dashboard.js +8 -5
- package/dist/resources/data-action.d.ts +3 -48
- package/dist/resources/data-action.js +9 -9
- package/dist/resources/data-app.d.ts +112 -0
- package/dist/resources/data-app.js +75 -0
- package/dist/resources/database.d.ts +1 -1
- package/dist/resources/dataset.d.ts +1 -1
- package/dist/resources/dependency.d.ts +1 -1
- package/dist/resources/dependency.js +13 -7
- package/dist/resources/document.d.ts +3 -10
- package/dist/resources/eid-translation.d.ts +2 -2
- package/dist/resources/erd.d.ts +1 -1
- package/dist/resources/field.d.ts +1 -1
- package/dist/resources/field.js +3 -2
- package/dist/resources/git-sync.d.ts +1 -1
- package/dist/resources/git-sync.js +1 -1
- package/dist/resources/glossary.d.ts +1 -1
- package/dist/resources/library.d.ts +4 -4
- package/dist/resources/library.js +2 -2
- package/dist/resources/measure.d.ts +1 -1
- package/dist/resources/metric.d.ts +1 -1
- package/dist/resources/moderation-review.d.ts +1 -1
- package/dist/resources/notification.d.ts +1 -1
- package/dist/resources/notification.js +2 -2
- package/dist/resources/optional-parsed.d.ts +1 -1
- package/dist/resources/permission.d.ts +1 -1
- package/dist/resources/pivot-export.d.ts +1 -1
- package/dist/resources/pulse.d.ts +1 -1
- package/dist/resources/pulse.js +3 -2
- package/dist/resources/replacement.d.ts +1 -1
- package/dist/resources/revision.d.ts +3 -3
- package/dist/resources/revision.js +5 -10
- package/dist/resources/search.d.ts +1 -1
- package/dist/resources/search.js +23 -2
- package/dist/resources/segment.d.ts +1 -1
- package/dist/resources/setting.d.ts +1 -1
- package/dist/resources/setup.d.ts +2 -2
- package/dist/resources/snippet.d.ts +1 -1
- package/dist/resources/table.d.ts +1 -1
- package/dist/resources/table.js +9 -10
- package/dist/resources/timeline-event.d.ts +2 -2
- package/dist/resources/timeline.d.ts +1 -1
- package/dist/resources/transform-dag-run.d.ts +2 -2
- package/dist/resources/transform-inspector.d.ts +4 -4
- package/dist/resources/transform-job.d.ts +1 -1
- package/dist/resources/transform-python.d.ts +11 -4
- package/dist/resources/transform-python.js +3 -2
- package/dist/resources/transform-tag.d.ts +1 -1
- package/dist/resources/transform-test.d.ts +1 -1
- package/dist/resources/transform.d.ts +1 -1
- package/dist/resources/transform.js +13 -3
- package/dist/resources/upload.d.ts +1 -1
- package/dist/resources/user.d.ts +2 -2
- package/dist/{revision-CQBPhohA.d.ts → revision-DNEw6S93.d.ts} +7 -5
- package/dist/{search-BxJipLN6.d.ts → search-BQWkdVg1.d.ts} +2 -2
- package/dist/{search-NZR6iRBs.d.ts → search-tK5lmRb8.d.ts} +23 -23
- package/dist/{segment-pj3wklGe.d.ts → segment-CbAgVO-5.d.ts} +1 -1
- package/dist/{segment-D2i34X9l.d.ts → segment-jyhBtOAZ.d.ts} +2 -2
- package/dist/{setup-Ez_U7GmM.d.ts → setup-JqcJ2unJ.d.ts} +1 -1
- package/dist/signal.d.ts +3 -2
- package/dist/signal.js +9 -4
- package/dist/{snippet-hEV429Pv.d.ts → snippet-C_Ilx7tR.d.ts} +2 -2
- package/dist/{snippet-RnnWa4TL.d.ts → snippet-DsgohpTV.d.ts} +2 -2
- package/dist/{table-B_lfuaHc.d.ts → table-B1pQSpTA.d.ts} +14 -14
- package/dist/{table-B3-UaPHa.d.ts → table-BAl8aPZZ.d.ts} +49 -44
- package/dist/{timeline-C2IEcRlP.d.ts → timeline-BdLvwRnl.d.ts} +2 -2
- package/dist/{timeline-folD3mQ_.d.ts → timeline-BfX1lMob.d.ts} +24 -24
- package/dist/{transform-CXOT5kFe.d.ts → transform-Ds74yPiY.d.ts} +48 -34
- package/dist/{transform-CDurgE1D.d.ts → transform-DwnIcpqV.d.ts} +153 -37
- package/dist/{transform-dag-run-BgZwv1yx.d.ts → transform-dag-run-BSrdrjaK.d.ts} +4 -4
- package/dist/{transform-inspector-BUYBt6--.d.ts → transform-inspector-BMaRqcRM.d.ts} +8 -8
- package/dist/{transform-job-29P6BULe.d.ts → transform-job-C85GxBHj.d.ts} +9 -9
- package/dist/{transform-job-CTJImaOd.d.ts → transform-job-Dfp9Ox0l.d.ts} +7 -5
- package/dist/{transform-python-DdDnW6yK.d.ts → transform-python-DtL3xxMj.d.ts} +49 -4
- package/dist/{transform-tag-DVUIZTEM.d.ts → transform-tag-C6j5EUkX.d.ts} +1 -1
- package/dist/{transform-test-A-CJYT6B.d.ts → transform-test-C3hiZ4AV.d.ts} +2 -2
- package/dist/{transform-test-BwuyrHpT.d.ts → transform-test-DROPvrkI.d.ts} +2 -2
- package/dist/{transport-E0ZaPNWJ.d.ts → transport-CS11mEqI.d.ts} +20 -6
- package/dist/{upload-B7PG3ePk.d.ts → upload-Bx1D7eNy.d.ts} +1 -1
- package/dist/{user-2r0OBoO6.d.ts → user-Sqqv7rqh.d.ts} +2 -2
- package/dist/version/capability-error.d.ts +1 -1
- package/dist/version/features.d.ts +2 -2
- package/dist/version/features.js +30 -2
- package/dist/version/input-gates.d.ts +2 -0
- package/dist/version/input-gates.js +13 -0
- package/dist/version/probe.d.ts +1 -1
- package/dist/version/profile.d.ts +1 -1
- package/dist/version/requirement-check.d.ts +1 -1
- package/dist/version/requirements.d.ts +1 -1
- package/dist/version/requirements.js +10 -0
- package/package.json +3 -2
|
@@ -6,7 +6,6 @@ declare const ParameterType: z.ZodEnum<{
|
|
|
6
6
|
id: "id";
|
|
7
7
|
date: "date";
|
|
8
8
|
text: "text";
|
|
9
|
-
"temporal-unit": "temporal-unit";
|
|
10
9
|
"date/single": "date/single";
|
|
11
10
|
category: "category";
|
|
12
11
|
"location/city": "location/city";
|
|
@@ -18,6 +17,7 @@ declare const ParameterType: z.ZodEnum<{
|
|
|
18
17
|
"date/quarter-year": "date/quarter-year";
|
|
19
18
|
"date/relative": "date/relative";
|
|
20
19
|
"date/all-options": "date/all-options";
|
|
20
|
+
"temporal-unit": "temporal-unit";
|
|
21
21
|
"number/!=": "number/!=";
|
|
22
22
|
"number/<=": "number/<=";
|
|
23
23
|
"number/=": "number/=";
|
|
@@ -91,7 +91,6 @@ declare const Parameter: z.ZodObject<{
|
|
|
91
91
|
id: "id";
|
|
92
92
|
date: "date";
|
|
93
93
|
text: "text";
|
|
94
|
-
"temporal-unit": "temporal-unit";
|
|
95
94
|
"date/single": "date/single";
|
|
96
95
|
category: "category";
|
|
97
96
|
"location/city": "location/city";
|
|
@@ -103,6 +102,7 @@ declare const Parameter: z.ZodObject<{
|
|
|
103
102
|
"date/quarter-year": "date/quarter-year";
|
|
104
103
|
"date/relative": "date/relative";
|
|
105
104
|
"date/all-options": "date/all-options";
|
|
105
|
+
"temporal-unit": "temporal-unit";
|
|
106
106
|
"number/!=": "number/!=";
|
|
107
107
|
"number/<=": "number/<=";
|
|
108
108
|
"number/=": "number/=";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CS11mEqI.js";
|
|
2
2
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
3
|
-
import { h as PulseUpdateInput, l as PulseCreateInput, t as Pulse } from "./pulse-
|
|
3
|
+
import { h as PulseUpdateInput, l as PulseCreateInput, t as Pulse } from "./pulse-BUlfrJZH.js";
|
|
4
4
|
//#region src/resources/pulse.d.ts
|
|
5
5
|
interface PulseListParams {
|
|
6
6
|
dashboard_id?: number | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { r as InputGate } from "./input-gates-DwKoTJVQ.js";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
//#region src/domain/pulse.d.ts
|
|
3
4
|
declare const PulseChannelType: z.ZodEnum<{
|
|
5
|
+
http: "http";
|
|
4
6
|
email: "email";
|
|
5
7
|
slack: "slack";
|
|
6
|
-
http: "http";
|
|
7
8
|
}>;
|
|
8
9
|
type PulseChannelType = z.infer<typeof PulseChannelType>;
|
|
9
10
|
declare const PulseScheduleType: z.ZodEnum<{
|
|
@@ -46,9 +47,9 @@ type PulseRecipientCompact = z.infer<typeof PulseRecipientCompact>;
|
|
|
46
47
|
declare const PulseChannel: z.ZodObject<{
|
|
47
48
|
id: z.ZodOptional<z.ZodNumber>;
|
|
48
49
|
channel_type: z.ZodEnum<{
|
|
50
|
+
http: "http";
|
|
49
51
|
email: "email";
|
|
50
52
|
slack: "slack";
|
|
51
|
-
http: "http";
|
|
52
53
|
}>;
|
|
53
54
|
channel_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
54
55
|
enabled: z.ZodBoolean;
|
|
@@ -84,14 +85,14 @@ declare const PulseChannel: z.ZodObject<{
|
|
|
84
85
|
type PulseChannel = z.infer<typeof PulseChannel>;
|
|
85
86
|
declare const PulseChannelCompact: z.ZodObject<{
|
|
86
87
|
enabled: z.ZodBoolean;
|
|
88
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
89
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$loose>>;
|
|
87
91
|
channel_type: z.ZodEnum<{
|
|
92
|
+
http: "http";
|
|
88
93
|
email: "email";
|
|
89
94
|
slack: "slack";
|
|
90
|
-
http: "http";
|
|
91
95
|
}>;
|
|
92
|
-
details: z.ZodOptional<z.ZodObject<{
|
|
93
|
-
channel: z.ZodOptional<z.ZodString>;
|
|
94
|
-
}, z.core.$loose>>;
|
|
95
96
|
schedule_type: z.ZodEnum<{
|
|
96
97
|
hourly: "hourly";
|
|
97
98
|
daily: "daily";
|
|
@@ -128,8 +129,8 @@ declare const PulseCard: z.ZodObject<{
|
|
|
128
129
|
}, z.core.$loose>;
|
|
129
130
|
type PulseCard = z.infer<typeof PulseCard>;
|
|
130
131
|
declare const PulseCardCompact: z.ZodObject<{
|
|
131
|
-
name: z.ZodString;
|
|
132
132
|
id: z.ZodNumber;
|
|
133
|
+
name: z.ZodString;
|
|
133
134
|
dashboard_card_id: z.ZodNullable<z.ZodNumber>;
|
|
134
135
|
include_csv: z.ZodBoolean;
|
|
135
136
|
include_xls: z.ZodBoolean;
|
|
@@ -151,7 +152,6 @@ declare const Pulse: z.ZodObject<{
|
|
|
151
152
|
id: "id";
|
|
152
153
|
date: "date";
|
|
153
154
|
text: "text";
|
|
154
|
-
"temporal-unit": "temporal-unit";
|
|
155
155
|
"date/single": "date/single";
|
|
156
156
|
category: "category";
|
|
157
157
|
"location/city": "location/city";
|
|
@@ -163,6 +163,7 @@ declare const Pulse: z.ZodObject<{
|
|
|
163
163
|
"date/quarter-year": "date/quarter-year";
|
|
164
164
|
"date/relative": "date/relative";
|
|
165
165
|
"date/all-options": "date/all-options";
|
|
166
|
+
"temporal-unit": "temporal-unit";
|
|
166
167
|
"number/!=": "number/!=";
|
|
167
168
|
"number/<=": "number/<=";
|
|
168
169
|
"number/=": "number/=";
|
|
@@ -235,9 +236,9 @@ declare const Pulse: z.ZodObject<{
|
|
|
235
236
|
channels: z.ZodArray<z.ZodObject<{
|
|
236
237
|
id: z.ZodOptional<z.ZodNumber>;
|
|
237
238
|
channel_type: z.ZodEnum<{
|
|
239
|
+
http: "http";
|
|
238
240
|
email: "email";
|
|
239
241
|
slack: "slack";
|
|
240
|
-
http: "http";
|
|
241
242
|
}>;
|
|
242
243
|
channel_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
243
244
|
enabled: z.ZodBoolean;
|
|
@@ -273,29 +274,29 @@ declare const Pulse: z.ZodObject<{
|
|
|
273
274
|
}, z.core.$loose>;
|
|
274
275
|
type Pulse = z.infer<typeof Pulse>;
|
|
275
276
|
declare const PulseCompact: z.ZodObject<{
|
|
276
|
-
name: z.ZodNullable<z.ZodString>;
|
|
277
277
|
id: z.ZodNumber;
|
|
278
|
-
|
|
278
|
+
name: z.ZodNullable<z.ZodString>;
|
|
279
279
|
archived: z.ZodBoolean;
|
|
280
|
+
collection_id: z.ZodNullable<z.ZodNumber>;
|
|
280
281
|
dashboard_id: z.ZodNullable<z.ZodNumber>;
|
|
281
282
|
skip_if_empty: z.ZodBoolean;
|
|
282
283
|
cards: z.ZodArray<z.ZodObject<{
|
|
283
|
-
name: z.ZodString;
|
|
284
284
|
id: z.ZodNumber;
|
|
285
|
+
name: z.ZodString;
|
|
285
286
|
dashboard_card_id: z.ZodNullable<z.ZodNumber>;
|
|
286
287
|
include_csv: z.ZodBoolean;
|
|
287
288
|
include_xls: z.ZodBoolean;
|
|
288
289
|
}, z.core.$strip>>;
|
|
289
290
|
channels: z.ZodArray<z.ZodObject<{
|
|
290
291
|
enabled: z.ZodBoolean;
|
|
292
|
+
details: z.ZodOptional<z.ZodObject<{
|
|
293
|
+
channel: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.core.$loose>>;
|
|
291
295
|
channel_type: z.ZodEnum<{
|
|
296
|
+
http: "http";
|
|
292
297
|
email: "email";
|
|
293
298
|
slack: "slack";
|
|
294
|
-
http: "http";
|
|
295
299
|
}>;
|
|
296
|
-
details: z.ZodOptional<z.ZodObject<{
|
|
297
|
-
channel: z.ZodOptional<z.ZodString>;
|
|
298
|
-
}, z.core.$loose>>;
|
|
299
300
|
schedule_type: z.ZodEnum<{
|
|
300
301
|
hourly: "hourly";
|
|
301
302
|
daily: "daily";
|
|
@@ -324,6 +325,7 @@ declare const PulseCompact: z.ZodObject<{
|
|
|
324
325
|
}, z.core.$strip>>;
|
|
325
326
|
}, z.core.$strip>;
|
|
326
327
|
type PulseCompact = z.infer<typeof PulseCompact>;
|
|
328
|
+
declare const SUBSCRIPTION_FILTERS_GATE: InputGate;
|
|
327
329
|
declare const PulseCreateInput: z.ZodObject<{
|
|
328
330
|
name: z.ZodString;
|
|
329
331
|
dashboard_id: z.ZodNumber;
|
|
@@ -337,9 +339,9 @@ declare const PulseCreateInput: z.ZodObject<{
|
|
|
337
339
|
}, z.core.$loose>>;
|
|
338
340
|
channels: z.ZodArray<z.ZodObject<{
|
|
339
341
|
channel_type: z.ZodEnum<{
|
|
342
|
+
http: "http";
|
|
340
343
|
email: "email";
|
|
341
344
|
slack: "slack";
|
|
342
|
-
http: "http";
|
|
343
345
|
}>;
|
|
344
346
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
345
347
|
schedule_type: z.ZodEnum<{
|
|
@@ -382,7 +384,6 @@ declare const PulseCreateInput: z.ZodObject<{
|
|
|
382
384
|
id: "id";
|
|
383
385
|
date: "date";
|
|
384
386
|
text: "text";
|
|
385
|
-
"temporal-unit": "temporal-unit";
|
|
386
387
|
"date/single": "date/single";
|
|
387
388
|
category: "category";
|
|
388
389
|
"location/city": "location/city";
|
|
@@ -394,6 +395,7 @@ declare const PulseCreateInput: z.ZodObject<{
|
|
|
394
395
|
"date/quarter-year": "date/quarter-year";
|
|
395
396
|
"date/relative": "date/relative";
|
|
396
397
|
"date/all-options": "date/all-options";
|
|
398
|
+
"temporal-unit": "temporal-unit";
|
|
397
399
|
"number/!=": "number/!=";
|
|
398
400
|
"number/<=": "number/<=";
|
|
399
401
|
"number/=": "number/=";
|
|
@@ -470,9 +472,9 @@ declare const PulseUpdateInput: z.ZodObject<{
|
|
|
470
472
|
}, z.core.$loose>>>;
|
|
471
473
|
channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
472
474
|
channel_type: z.ZodEnum<{
|
|
475
|
+
http: "http";
|
|
473
476
|
email: "email";
|
|
474
477
|
slack: "slack";
|
|
475
|
-
http: "http";
|
|
476
478
|
}>;
|
|
477
479
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
478
480
|
schedule_type: z.ZodEnum<{
|
|
@@ -516,7 +518,6 @@ declare const PulseUpdateInput: z.ZodObject<{
|
|
|
516
518
|
id: "id";
|
|
517
519
|
date: "date";
|
|
518
520
|
text: "text";
|
|
519
|
-
"temporal-unit": "temporal-unit";
|
|
520
521
|
"date/single": "date/single";
|
|
521
522
|
category: "category";
|
|
522
523
|
"location/city": "location/city";
|
|
@@ -528,6 +529,7 @@ declare const PulseUpdateInput: z.ZodObject<{
|
|
|
528
529
|
"date/quarter-year": "date/quarter-year";
|
|
529
530
|
"date/relative": "date/relative";
|
|
530
531
|
"date/all-options": "date/all-options";
|
|
532
|
+
"temporal-unit": "temporal-unit";
|
|
531
533
|
"number/!=": "number/!=";
|
|
532
534
|
"number/<=": "number/<=";
|
|
533
535
|
"number/=": "number/=";
|
|
@@ -593,4 +595,4 @@ declare const PulseUpdateInput: z.ZodObject<{
|
|
|
593
595
|
}, z.core.$loose>;
|
|
594
596
|
type PulseUpdateInput = z.infer<typeof PulseUpdateInput>;
|
|
595
597
|
//#endregion
|
|
596
|
-
export { PulseChannelCompact as a, PulseCompact as c, PulseRecipientCompact as d, PulseScheduleDay as f, PulseUpdateInput as h, PulseChannel as i, PulseCreateInput as l, PulseScheduleType as m, PulseCard as n, PulseChannelDetails as o, PulseScheduleFrame as p, PulseCardCompact as r, PulseChannelType as s, Pulse as t, PulseRecipient as u };
|
|
598
|
+
export { PulseChannelCompact as a, PulseCompact as c, PulseRecipientCompact as d, PulseScheduleDay as f, SUBSCRIPTION_FILTERS_GATE as g, PulseUpdateInput as h, PulseChannel as i, PulseCreateInput as l, PulseScheduleType as m, PulseCard as n, PulseChannelDetails as o, PulseScheduleFrame as p, PulseCardCompact as r, PulseChannelType as s, Pulse as t, PulseRecipient as u };
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/domain/replacement.d.ts
|
|
3
3
|
declare const ReplacementSourceType: z.ZodEnum<{
|
|
4
|
-
card: "card";
|
|
5
4
|
table: "table";
|
|
5
|
+
card: "card";
|
|
6
6
|
}>;
|
|
7
7
|
type ReplacementSourceType = z.infer<typeof ReplacementSourceType>;
|
|
8
8
|
declare const ReplacementEntityType: z.ZodEnum<{
|
|
9
|
-
card: "card";
|
|
10
|
-
table: "table";
|
|
11
9
|
transform: "transform";
|
|
10
|
+
table: "table";
|
|
11
|
+
card: "card";
|
|
12
12
|
}>;
|
|
13
13
|
type ReplacementEntityType = z.infer<typeof ReplacementEntityType>;
|
|
14
14
|
declare const ReplacementRunStatus: z.ZodEnum<{
|
|
15
|
-
timeout: "timeout";
|
|
16
|
-
failed: "failed";
|
|
17
15
|
pending: "pending";
|
|
18
16
|
started: "started";
|
|
19
17
|
succeeded: "succeeded";
|
|
18
|
+
failed: "failed";
|
|
20
19
|
canceled: "canceled";
|
|
20
|
+
timeout: "timeout";
|
|
21
21
|
}>;
|
|
22
22
|
type ReplacementRunStatus = z.infer<typeof ReplacementRunStatus>;
|
|
23
23
|
declare const ReplacementRun: z.ZodObject<{
|
|
24
24
|
id: z.ZodNumber;
|
|
25
25
|
status: z.ZodEnum<{
|
|
26
|
-
timeout: "timeout";
|
|
27
|
-
failed: "failed";
|
|
28
26
|
pending: "pending";
|
|
29
27
|
started: "started";
|
|
30
28
|
succeeded: "succeeded";
|
|
29
|
+
failed: "failed";
|
|
31
30
|
canceled: "canceled";
|
|
31
|
+
timeout: "timeout";
|
|
32
32
|
}>;
|
|
33
33
|
is_active: z.ZodNullable<z.ZodLiteral<true>>;
|
|
34
34
|
source_entity_type: z.ZodEnum<{
|
|
35
|
-
card: "card";
|
|
36
|
-
table: "table";
|
|
37
35
|
transform: "transform";
|
|
36
|
+
table: "table";
|
|
37
|
+
card: "card";
|
|
38
38
|
}>;
|
|
39
39
|
source_entity_id: z.ZodNumber;
|
|
40
40
|
target_entity_type: z.ZodEnum<{
|
|
41
|
-
card: "card";
|
|
42
|
-
table: "table";
|
|
43
41
|
transform: "transform";
|
|
42
|
+
table: "table";
|
|
43
|
+
card: "card";
|
|
44
44
|
}>;
|
|
45
45
|
target_entity_id: z.ZodNumber;
|
|
46
46
|
progress: z.ZodNullable<z.ZodNumber>;
|
|
@@ -53,25 +53,25 @@ type ReplacementRun = z.infer<typeof ReplacementRun>;
|
|
|
53
53
|
declare const ReplacementRunCompact: z.ZodObject<{
|
|
54
54
|
message: z.ZodNullable<z.ZodString>;
|
|
55
55
|
id: z.ZodNumber;
|
|
56
|
-
source_entity_type: z.ZodEnum<{
|
|
57
|
-
card: "card";
|
|
58
|
-
table: "table";
|
|
59
|
-
transform: "transform";
|
|
60
|
-
}>;
|
|
61
|
-
source_entity_id: z.ZodNumber;
|
|
62
56
|
status: z.ZodEnum<{
|
|
63
|
-
timeout: "timeout";
|
|
64
|
-
failed: "failed";
|
|
65
57
|
pending: "pending";
|
|
66
58
|
started: "started";
|
|
67
59
|
succeeded: "succeeded";
|
|
60
|
+
failed: "failed";
|
|
68
61
|
canceled: "canceled";
|
|
62
|
+
timeout: "timeout";
|
|
69
63
|
}>;
|
|
64
|
+
source_entity_type: z.ZodEnum<{
|
|
65
|
+
transform: "transform";
|
|
66
|
+
table: "table";
|
|
67
|
+
card: "card";
|
|
68
|
+
}>;
|
|
69
|
+
source_entity_id: z.ZodNumber;
|
|
70
70
|
progress: z.ZodNullable<z.ZodNumber>;
|
|
71
71
|
target_entity_type: z.ZodEnum<{
|
|
72
|
-
card: "card";
|
|
73
|
-
table: "table";
|
|
74
72
|
transform: "transform";
|
|
73
|
+
table: "table";
|
|
74
|
+
card: "card";
|
|
75
75
|
}>;
|
|
76
76
|
target_entity_id: z.ZodNumber;
|
|
77
77
|
start_time: z.ZodString;
|
|
@@ -2422,13 +2422,13 @@ type ReplacementCheck = z.infer<typeof ReplacementCheck>;
|
|
|
2422
2422
|
declare const ReplacementSourceInput: z.ZodObject<{
|
|
2423
2423
|
source_entity_id: z.ZodNumber;
|
|
2424
2424
|
source_entity_type: z.ZodEnum<{
|
|
2425
|
-
card: "card";
|
|
2426
2425
|
table: "table";
|
|
2426
|
+
card: "card";
|
|
2427
2427
|
}>;
|
|
2428
2428
|
target_entity_id: z.ZodNumber;
|
|
2429
2429
|
target_entity_type: z.ZodEnum<{
|
|
2430
|
-
card: "card";
|
|
2431
2430
|
table: "table";
|
|
2431
|
+
card: "card";
|
|
2432
2432
|
}>;
|
|
2433
2433
|
}, z.core.$strict>;
|
|
2434
2434
|
type ReplacementSourceInput = z.infer<typeof ReplacementSourceInput>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "./transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "./transport-CS11mEqI.js";
|
|
2
2
|
import { t as ListResult } from "./list-BT_bBm9Z.js";
|
|
3
3
|
//#region src/resources/replacement.d.ts
|
|
4
4
|
interface ReplacementRunListParams {
|
|
@@ -7,9 +7,9 @@ interface ReplacementRunListParams {
|
|
|
7
7
|
declare function replacementResource(transport: Transport): {
|
|
8
8
|
checkReplaceSource: (params: {
|
|
9
9
|
source_entity_id: number;
|
|
10
|
-
source_entity_type: "
|
|
10
|
+
source_entity_type: "table" | "card";
|
|
11
11
|
target_entity_id: number;
|
|
12
|
-
target_entity_type: "
|
|
12
|
+
target_entity_type: "table" | "card";
|
|
13
13
|
}, options?: RequestOptions | undefined) => Promise<{
|
|
14
14
|
success: boolean;
|
|
15
15
|
errors?: ("cycle-detected" | "database-mismatch" | "incompatible-implicit-joins" | "affects-gtap-policies")[] | undefined;
|
|
@@ -53,9 +53,9 @@ declare function replacementResource(transport: Transport): {
|
|
|
53
53
|
}>;
|
|
54
54
|
replaceSource: (params: {
|
|
55
55
|
source_entity_id: number;
|
|
56
|
-
source_entity_type: "
|
|
56
|
+
source_entity_type: "table" | "card";
|
|
57
57
|
target_entity_id: number;
|
|
58
|
-
target_entity_type: "
|
|
58
|
+
target_entity_type: "table" | "card";
|
|
59
59
|
}, options?: RequestOptions | undefined) => Promise<{
|
|
60
60
|
run_id: number;
|
|
61
61
|
}>;
|
|
@@ -95,11 +95,11 @@ declare function replacementResource(transport: Transport): {
|
|
|
95
95
|
listRuns: (params?: ReplacementRunListParams | undefined, options?: RequestOptions | undefined) => Promise<ListResult<{
|
|
96
96
|
[x: string]: unknown;
|
|
97
97
|
id: number;
|
|
98
|
-
status: "
|
|
98
|
+
status: "pending" | "started" | "succeeded" | "failed" | "canceled" | "timeout";
|
|
99
99
|
is_active: true | null;
|
|
100
|
-
source_entity_type: "
|
|
100
|
+
source_entity_type: "transform" | "table" | "card";
|
|
101
101
|
source_entity_id: number;
|
|
102
|
-
target_entity_type: "
|
|
102
|
+
target_entity_type: "transform" | "table" | "card";
|
|
103
103
|
target_entity_id: number;
|
|
104
104
|
progress: number | null;
|
|
105
105
|
message: string | null;
|
|
@@ -110,11 +110,11 @@ declare function replacementResource(transport: Transport): {
|
|
|
110
110
|
getRun: (id: number, options?: RequestOptions | undefined) => Promise<{
|
|
111
111
|
[x: string]: unknown;
|
|
112
112
|
id: number;
|
|
113
|
-
status: "
|
|
113
|
+
status: "pending" | "started" | "succeeded" | "failed" | "canceled" | "timeout";
|
|
114
114
|
is_active: true | null;
|
|
115
|
-
source_entity_type: "
|
|
115
|
+
source_entity_type: "transform" | "table" | "card";
|
|
116
116
|
source_entity_id: number;
|
|
117
|
-
target_entity_type: "
|
|
117
|
+
target_entity_type: "transform" | "table" | "card";
|
|
118
118
|
target_entity_id: number;
|
|
119
119
|
progress: number | null;
|
|
120
120
|
message: string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as FeatureName } from "./features-
|
|
2
|
-
import { b as RequirementFailure, yt as ServerProfile } from "./transport-
|
|
1
|
+
import { i as FeatureName } from "./features-SMSfJhB6.js";
|
|
2
|
+
import { b as RequirementFailure, yt as ServerProfile } from "./transport-CS11mEqI.js";
|
|
3
3
|
//#region src/version/requirement-check.d.ts
|
|
4
4
|
/** The first of `features` the profile lacks, or `null` when it has every one. */
|
|
5
5
|
declare function checkFeatures(features: readonly FeatureName[], profile: ServerProfile): RequirementFailure | null;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { i as FeatureName } from "./features-
|
|
1
|
+
import { i as FeatureName } from "./features-SMSfJhB6.js";
|
|
2
2
|
//#region src/version/requirements.d.ts
|
|
3
3
|
declare const METHOD_REQUIREMENTS: {
|
|
4
|
+
"apiKey.list": never[];
|
|
5
|
+
"apiKey.create": never[];
|
|
6
|
+
"apiKey.delete": never[];
|
|
4
7
|
"card.list": never[];
|
|
5
8
|
"card.get": never[];
|
|
6
9
|
"card.create": never[];
|
|
@@ -35,6 +38,13 @@ declare const METHOD_REQUIREMENTS: {
|
|
|
35
38
|
"dataAction.archive": never[];
|
|
36
39
|
"dataAction.delete": never[];
|
|
37
40
|
"dataAction.execute": never[];
|
|
41
|
+
"dataApp.list": "dataApps"[];
|
|
42
|
+
"dataApp.get": "dataApps"[];
|
|
43
|
+
"dataApp.create": "dataApps"[];
|
|
44
|
+
"dataApp.update": "dataApps"[];
|
|
45
|
+
"dataApp.replaceBundle": "dataApps"[];
|
|
46
|
+
"dataApp.typedSchema": "dataApps"[];
|
|
47
|
+
"dataApp.delete": "dataApps"[];
|
|
38
48
|
"database.list": never[];
|
|
39
49
|
"database.get": never[];
|
|
40
50
|
"database.update": never[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-CS11mEqI.js";
|
|
2
|
+
import { t as ListResult } from "../list-BT_bBm9Z.js";
|
|
3
|
+
import { i as CreatedApiKey, r as ApiKeyCreateInput, t as ApiKey } from "../api-key-DJeN1-7G.js";
|
|
4
|
+
//#region src/resources/api-key.d.ts
|
|
5
|
+
declare function apiKeyResource(transport: Transport): {
|
|
6
|
+
list: (options?: RequestOptions) => Promise<ListResult<ApiKey>>;
|
|
7
|
+
create: (params: ApiKeyCreateInput, options?: RequestOptions) => Promise<CreatedApiKey>;
|
|
8
|
+
delete: (id: number, options?: RequestOptions) => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { apiKeyResource };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ApiKey, CreatedApiKey } from "../domain/api-key.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/resources/api-key.ts
|
|
4
|
+
function apiKeyResource(transport) {
|
|
5
|
+
/** List the API keys, each with its masked key and the group it acts as. `GET /api/api-key` answers a bare array. */
|
|
6
|
+
async function list(options = {}) {
|
|
7
|
+
return {
|
|
8
|
+
data: await transport.requestParsed(z.array(ApiKey), "/api/api-key", { ...options }),
|
|
9
|
+
total: null
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/** Create an API key acting as a member of the group; the answer carries the key itself, which no later read returns. */
|
|
13
|
+
async function create(params, options = {}) {
|
|
14
|
+
return transport.requestParsed(CreatedApiKey, "/api/api-key", {
|
|
15
|
+
...options,
|
|
16
|
+
method: "POST",
|
|
17
|
+
body: params
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/** Delete an API key by id; requests made with it fail from then on. */
|
|
21
|
+
async function remove(id, options = {}) {
|
|
22
|
+
await transport.requestRaw(`/api/api-key/${id}`, {
|
|
23
|
+
...options,
|
|
24
|
+
method: "DELETE",
|
|
25
|
+
expectContentType: "binary"
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
list,
|
|
30
|
+
create,
|
|
31
|
+
delete: remove
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { apiKeyResource };
|
package/dist/resources/card.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as cardResource, n as CardListParams, r as CardQueryParams, t as CardExportParams } from "../card-
|
|
1
|
+
import { i as cardResource, n as CardListParams, r as CardQueryParams, t as CardExportParams } from "../card-CbV6hLYH.js";
|
|
2
2
|
export { CardExportParams, CardListParams, CardQueryParams, cardResource };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as collectionResource, i as CollectionTreeParams, n as CollectionItemPageOptions, o as listCollectionsAs, r as CollectionListParams, t as CollectionItemListParams } from "../collection-
|
|
1
|
+
import { a as collectionResource, i as CollectionTreeParams, n as CollectionItemPageOptions, o as listCollectionsAs, r as CollectionListParams, t as CollectionItemListParams } from "../collection-Q9FNMiRh.js";
|
|
2
2
|
export { CollectionItemListParams, CollectionItemPageOptions, CollectionListParams, CollectionTreeParams, collectionResource, listCollectionsAs };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Collection, CollectionItem, CollectionTreeNode } from "../domain/collection.js";
|
|
2
2
|
import { paginatePages } from "../paginate.js";
|
|
3
|
+
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
3
4
|
import { z } from "zod";
|
|
4
5
|
//#region src/resources/collection.ts
|
|
5
6
|
const CollectionApiList = z.array(Collection);
|
|
@@ -10,6 +11,24 @@ const COLLECTION_LIST_QUERY = {
|
|
|
10
11
|
personal: { "personal-only": true }
|
|
11
12
|
};
|
|
12
13
|
const DEFAULT_LIST_FILTER = "all";
|
|
14
|
+
const INCLUDE_LIBRARY = { "include-library": true };
|
|
15
|
+
const TRASH_ALIAS = "trash";
|
|
16
|
+
const MODELS_FIELDS = ["models"];
|
|
17
|
+
const ITEM_MODEL_FEATURES = {
|
|
18
|
+
transform: "transforms",
|
|
19
|
+
measure: "collectionItemMeasures",
|
|
20
|
+
exploration: "explorations"
|
|
21
|
+
};
|
|
22
|
+
function itemModelFeatures(_ref, params = {}) {
|
|
23
|
+
if (params.models === void 0) return [];
|
|
24
|
+
return params.models.flatMap((model) => {
|
|
25
|
+
const feature = ITEM_MODEL_FEATURES[model];
|
|
26
|
+
return feature === void 0 ? [] : [{
|
|
27
|
+
feature,
|
|
28
|
+
fields: MODELS_FIELDS
|
|
29
|
+
}];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
13
32
|
function refPath(ref) {
|
|
14
33
|
return encodeURIComponent(ref);
|
|
15
34
|
}
|
|
@@ -21,9 +40,13 @@ function refPath(ref) {
|
|
|
21
40
|
* that never reads the field.
|
|
22
41
|
*/
|
|
23
42
|
async function listCollectionsAs(transport, schema, options = {}) {
|
|
24
|
-
return transport.requestParsed(z.array(schema), "/api/collection", {
|
|
43
|
+
return transport.requestParsed(z.array(schema), "/api/collection", {
|
|
44
|
+
...options,
|
|
45
|
+
query: INCLUDE_LIBRARY
|
|
46
|
+
});
|
|
25
47
|
}
|
|
26
48
|
function collectionResource(transport) {
|
|
49
|
+
const { explainWalk } = explainer(transport, "collection");
|
|
27
50
|
/**
|
|
28
51
|
* List collections. `filter` picks a server-side preset: everything, archived, or personal. Every
|
|
29
52
|
* preset includes the Library collections that match it. `namespace` lists that namespace's
|
|
@@ -35,6 +58,7 @@ function collectionResource(transport) {
|
|
|
35
58
|
...options,
|
|
36
59
|
query: {
|
|
37
60
|
...COLLECTION_LIST_QUERY[params.filter ?? DEFAULT_LIST_FILTER],
|
|
61
|
+
...INCLUDE_LIBRARY,
|
|
38
62
|
namespace: params.namespace
|
|
39
63
|
}
|
|
40
64
|
}),
|
|
@@ -71,19 +95,24 @@ function collectionResource(transport) {
|
|
|
71
95
|
}
|
|
72
96
|
/**
|
|
73
97
|
* Walk the items inside a collection one page at a time. This endpoint pages on the server, so
|
|
74
|
-
* the caller consumes pages rather than a single list and decides how far to pull.
|
|
98
|
+
* the caller consumes pages rather than a single list and decides how far to pull. The `trash`
|
|
99
|
+
* alias costs one more request, which reads the trash collection's id. A `models` filter takes
|
|
100
|
+
* `transform` only with `transforms`, `measure` only with `collectionItemMeasures`, and
|
|
101
|
+
* `exploration` only with `explorations`.
|
|
75
102
|
*/
|
|
76
103
|
async function* itemPages(ref, params = {}, options = {}) {
|
|
77
|
-
|
|
104
|
+
const withSignal = options.signal !== void 0 && { signal: options.signal };
|
|
105
|
+
yield* paginatePages(transport, `/api/collection/${refPath(ref === TRASH_ALIAS ? (await get(TRASH_ALIAS, { ...withSignal })).id : ref)}/items`, CollectionItem, {
|
|
78
106
|
query: {
|
|
79
107
|
models: params.models,
|
|
80
108
|
archived: params.archived,
|
|
81
|
-
pinned_state: params.pinned_state
|
|
109
|
+
pinned_state: params.pinned_state,
|
|
110
|
+
"pinned-state": params.pinned_state
|
|
82
111
|
},
|
|
83
112
|
...options.offset !== void 0 && { offset: options.offset },
|
|
84
113
|
...options.max !== void 0 && { max: options.max },
|
|
85
114
|
...options.pageSize !== void 0 && { pageSize: options.pageSize },
|
|
86
|
-
...
|
|
115
|
+
...withSignal
|
|
87
116
|
});
|
|
88
117
|
}
|
|
89
118
|
/** Fetch the collection hierarchy as a forest of nested nodes. */
|
|
@@ -102,7 +131,7 @@ function collectionResource(transport) {
|
|
|
102
131
|
create,
|
|
103
132
|
update,
|
|
104
133
|
archive,
|
|
105
|
-
itemPages,
|
|
134
|
+
itemPages: explainWalk("itemPages", itemPages, itemModelFeatures),
|
|
106
135
|
tree
|
|
107
136
|
};
|
|
108
137
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as RequestOptions, h as Transport } from "../transport-
|
|
1
|
+
import { f as RequestOptions, h as Transport } from "../transport-CS11mEqI.js";
|
|
2
2
|
import { t as CsvFile } from "../csv-upload--K35QedP.js";
|
|
3
3
|
//#region src/resources/content-translation.d.ts
|
|
4
4
|
declare function contentTranslationResource(transport: Transport): {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ContentTranslationUploadResult } from "../domain/content-translation.js";
|
|
2
1
|
import { t as explainer } from "../refusal-B9aeHMc9.js";
|
|
2
|
+
import { ContentTranslationUploadResult } from "../domain/content-translation.js";
|
|
3
3
|
import { buildCsvFormData } from "./csv-upload.js";
|
|
4
4
|
//#region src/resources/content-translation.ts
|
|
5
5
|
const CONTENT_TRANSLATION_PATH = "/api/ee/content-translation";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DashcardCardProblem, i as DashcardCardMissing, n as DashcardCardArchived, o as DashcardCardUnreadable, r as DashcardCardIssue, s as dashboardResource, t as DashboardListParams } from "../dashboard-
|
|
1
|
+
import { a as DashcardCardProblem, i as DashcardCardMissing, n as DashcardCardArchived, o as DashcardCardUnreadable, r as DashcardCardIssue, s as dashboardResource, t as DashboardListParams } from "../dashboard-CknUcTp8.js";
|
|
2
2
|
export { DashboardListParams, DashcardCardArchived, DashcardCardIssue, DashcardCardMissing, DashcardCardProblem, DashcardCardUnreadable, dashboardResource };
|
|
@@ -2,7 +2,8 @@ import { ConfigError } from "../errors.js";
|
|
|
2
2
|
import { a as HttpError } from "../errors-DdMlaXqq.js";
|
|
3
3
|
import { ParameterValues } from "../domain/parameter.js";
|
|
4
4
|
import { cardResource } from "./card.js";
|
|
5
|
-
import { Dashboard, DashboardCopy,
|
|
5
|
+
import { Dashboard, DashboardCopy, DashboardCreateInput, Dashcard, dashboardDetailSchema } from "../domain/dashboard.js";
|
|
6
|
+
import { parseRequestBody } from "./request-body.js";
|
|
6
7
|
import { z } from "zod";
|
|
7
8
|
//#region src/resources/dashboard.ts
|
|
8
9
|
const DashboardApiList = z.array(Dashboard);
|
|
@@ -21,17 +22,19 @@ function dashboardResource(transport) {
|
|
|
21
22
|
}
|
|
22
23
|
/** Get one dashboard by id, with its dashcards, tabs and parameters. */
|
|
23
24
|
async function get(id, options = {}) {
|
|
24
|
-
return transport.requestParsed(
|
|
25
|
+
return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, { ...options });
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
28
|
* Create a dashboard. The endpoint accepts no dashcards or tabs — a follow-up `update` is what
|
|
28
|
-
* puts content on a fresh dashboard.
|
|
29
|
+
* puts content on a fresh dashboard. A key `DashboardCreateInput` does not declare is dropped
|
|
30
|
+
* before the request, as the server drops it.
|
|
29
31
|
*/
|
|
30
32
|
async function create(params, options = {}) {
|
|
33
|
+
const body = parseRequestBody(DashboardCreateInput, params, "dashboard");
|
|
31
34
|
return transport.requestParsed(Dashboard, "/api/dashboard", {
|
|
32
35
|
...options,
|
|
33
36
|
method: "POST",
|
|
34
|
-
body
|
|
37
|
+
body
|
|
35
38
|
});
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
@@ -42,7 +45,7 @@ function dashboardResource(transport) {
|
|
|
42
45
|
*/
|
|
43
46
|
async function update(id, params, options = {}) {
|
|
44
47
|
const body = await withCurrentTabs(id, params, options);
|
|
45
|
-
return transport.requestParsed(
|
|
48
|
+
return transport.requestParsed(dashboardDetailSchema, `/api/dashboard/${id}`, {
|
|
46
49
|
...options,
|
|
47
50
|
method: "PUT",
|
|
48
51
|
body
|