@distilled.cloud/cloudflare 1.0.0-rc.5 → 1.0.0-rc.7
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/lib/services/audit_logs.d.ts +59 -2
- package/lib/services/audit_logs.d.ts.map +1 -1
- package/lib/services/audit_logs.js +55 -5
- package/lib/services/audit_logs.js.map +1 -1
- package/lib/services/email_routing.d.ts +51 -6
- package/lib/services/email_routing.d.ts.map +1 -1
- package/lib/services/email_routing.js +46 -4
- package/lib/services/email_routing.js.map +1 -1
- package/lib/services/logs.d.ts +35 -3
- package/lib/services/logs.d.ts.map +1 -1
- package/lib/services/logs.js +38 -7
- package/lib/services/logs.js.map +1 -1
- package/lib/services/memberships.d.ts +50 -2
- package/lib/services/memberships.d.ts.map +1 -1
- package/lib/services/memberships.js +42 -5
- package/lib/services/memberships.js.map +1 -1
- package/lib/services/user.d.ts +58 -2
- package/lib/services/user.d.ts.map +1 -1
- package/lib/services/user.js +55 -4
- package/lib/services/user.js.map +1 -1
- package/package.json +4 -4
- package/src/services/audit_logs.ts +136 -12
- package/src/services/email_routing.ts +130 -10
- package/src/services/logs.ts +119 -21
- package/src/services/memberships.ts +116 -12
- package/src/services/user.ts +136 -12
|
@@ -82,6 +82,18 @@ export class Forbidden
|
|
|
82
82
|
[{ status: 403 }],
|
|
83
83
|
) {}
|
|
84
84
|
|
|
85
|
+
export class WorkerScriptNotFound
|
|
86
|
+
extends /*@__PURE__*/ T.applyErrorMatchers(
|
|
87
|
+
/*@__PURE__*/ S.TaggedError<WorkerScriptNotFound>()(
|
|
88
|
+
"WorkerScriptNotFound",
|
|
89
|
+
{
|
|
90
|
+
code: S.Number,
|
|
91
|
+
message: S.String,
|
|
92
|
+
},
|
|
93
|
+
),
|
|
94
|
+
[{ code: 2016 }],
|
|
95
|
+
) {}
|
|
96
|
+
|
|
85
97
|
export type AddressesEditRequestStatus = "unverified" | "verified";
|
|
86
98
|
export const AddressesEditRequestStatus = /*@__PURE__*/ S.String;
|
|
87
99
|
|
|
@@ -532,7 +544,6 @@ export const DeleteDnsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
532
544
|
identifier: "DeleteDnsRequest",
|
|
533
545
|
}) as any as S.Schema<DeleteDnsRequest>;
|
|
534
546
|
|
|
535
|
-
/** Raw response payload (operation does not use the standard v4 result envelope). */
|
|
536
547
|
export interface DeleteDnsResponse {}
|
|
537
548
|
export const DeleteDnsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
538
549
|
S.Struct({}).pipe(T.KeyDictionary(KEY_DICTIONARY)),
|
|
@@ -866,10 +877,109 @@ export const GetDnsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
866
877
|
.pipe(T.KeyDictionary(KEY_DICTIONARY)),
|
|
867
878
|
).annotate({ identifier: "GetDnsRequest" }) as any as S.Schema<GetDnsRequest>;
|
|
868
879
|
|
|
869
|
-
|
|
870
|
-
|
|
880
|
+
export type DnsGetResponseErrorsItemMissingType =
|
|
881
|
+
| "A"
|
|
882
|
+
| "AAAA"
|
|
883
|
+
| "CNAME"
|
|
884
|
+
| "HTTPS"
|
|
885
|
+
| "TXT"
|
|
886
|
+
| "SRV"
|
|
887
|
+
| "LOC"
|
|
888
|
+
| "MX"
|
|
889
|
+
| "NS"
|
|
890
|
+
| "CERT"
|
|
891
|
+
| "DNSKEY"
|
|
892
|
+
| "DS"
|
|
893
|
+
| "NAPTR"
|
|
894
|
+
| "SMIMEA"
|
|
895
|
+
| "SSHFP"
|
|
896
|
+
| "SVCB"
|
|
897
|
+
| "TLSA"
|
|
898
|
+
| "URI";
|
|
899
|
+
export const DnsGetResponseErrorsItemMissingType = /*@__PURE__*/ S.String;
|
|
900
|
+
|
|
901
|
+
export interface DnsGetResponseErrorsItemMissing {
|
|
902
|
+
/** DNS record content. */
|
|
903
|
+
content?: string | null;
|
|
904
|
+
/** DNS record name (or @ for the zone apex). */
|
|
905
|
+
name?: string | null;
|
|
906
|
+
/** Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. */
|
|
907
|
+
priority?: number | null;
|
|
908
|
+
/** Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. */
|
|
909
|
+
ttl?: number | null;
|
|
910
|
+
/** DNS record type. */
|
|
911
|
+
type?: DnsGetResponseErrorsItemMissingType | null;
|
|
912
|
+
}
|
|
913
|
+
export const DnsGetResponseErrorsItemMissing = /*@__PURE__*/ S.suspend(() =>
|
|
914
|
+
S.Struct({
|
|
915
|
+
content: S.optional(S.NullOr(S.String)),
|
|
916
|
+
name: S.optional(S.NullOr(S.String)),
|
|
917
|
+
priority: S.optional(S.NullOr(S.Number)),
|
|
918
|
+
ttl: S.optional(S.NullOr(S.Number)),
|
|
919
|
+
type: S.optional(S.NullOr(DnsGetResponseErrorsItemMissingType)),
|
|
920
|
+
}),
|
|
921
|
+
).annotate({
|
|
922
|
+
identifier: "DnsGetResponseErrorsItemMissing",
|
|
923
|
+
}) as any as S.Schema<DnsGetResponseErrorsItemMissing>;
|
|
924
|
+
|
|
925
|
+
export interface DnsGetResponseErrorsItem {
|
|
926
|
+
code?: string | null;
|
|
927
|
+
/** List of records needed to enable an Email Routing zone. */
|
|
928
|
+
missing?: DnsGetResponseErrorsItemMissing | null;
|
|
929
|
+
}
|
|
930
|
+
export const DnsGetResponseErrorsItem = /*@__PURE__*/ S.suspend(() =>
|
|
931
|
+
S.Struct({
|
|
932
|
+
code: S.optional(S.NullOr(S.String)),
|
|
933
|
+
missing: S.optional(S.NullOr(DnsGetResponseErrorsItemMissing)),
|
|
934
|
+
}),
|
|
935
|
+
).annotate({
|
|
936
|
+
identifier: "DnsGetResponseErrorsItem",
|
|
937
|
+
}) as any as S.Schema<DnsGetResponseErrorsItem>;
|
|
938
|
+
|
|
939
|
+
export type DnsGetResponseErrorsList = Array<DnsGetResponseErrorsItem>;
|
|
940
|
+
export const DnsGetResponseErrorsList = /*@__PURE__*/ S.Array(
|
|
941
|
+
DnsGetResponseErrorsItem,
|
|
942
|
+
) as any as S.Schema<DnsGetResponseErrorsList>;
|
|
943
|
+
|
|
944
|
+
export interface DnsGetResponseRecordItem {
|
|
945
|
+
/** DNS record content. */
|
|
946
|
+
content?: string | null;
|
|
947
|
+
/** DNS record name (or @ for the zone apex). */
|
|
948
|
+
name?: string | null;
|
|
949
|
+
/** Required for MX, SRV and URI records. Unused by other record types. Records with lower priorities are preferred. */
|
|
950
|
+
priority?: number | null;
|
|
951
|
+
/** Time to live, in seconds, of the DNS record. Must be between 60 and 86400, or 1 for 'automatic'. */
|
|
952
|
+
ttl?: number | null;
|
|
953
|
+
/** DNS record type. */
|
|
954
|
+
type?: string | null;
|
|
955
|
+
}
|
|
956
|
+
export const DnsGetResponseRecordItem = /*@__PURE__*/ S.suspend(() =>
|
|
957
|
+
S.Struct({
|
|
958
|
+
content: S.optional(S.NullOr(S.String)),
|
|
959
|
+
name: S.optional(S.NullOr(S.String)),
|
|
960
|
+
priority: S.optional(S.NullOr(S.Number)),
|
|
961
|
+
ttl: S.optional(S.NullOr(S.Number)),
|
|
962
|
+
type: S.optional(S.NullOr(S.String)),
|
|
963
|
+
}),
|
|
964
|
+
).annotate({
|
|
965
|
+
identifier: "DnsGetResponseRecordItem",
|
|
966
|
+
}) as any as S.Schema<DnsGetResponseRecordItem>;
|
|
967
|
+
|
|
968
|
+
export type DnsGetResponseRecordList = Array<DnsGetResponseRecordItem>;
|
|
969
|
+
export const DnsGetResponseRecordList = /*@__PURE__*/ S.Array(
|
|
970
|
+
DnsGetResponseRecordItem,
|
|
971
|
+
) as any as S.Schema<DnsGetResponseRecordList>;
|
|
972
|
+
|
|
973
|
+
/** Unwrapped `result` payload of the Cloudflare v4 response envelope. */
|
|
974
|
+
export interface GetDnsResponse {
|
|
975
|
+
errors?: DnsGetResponseErrorsList | null;
|
|
976
|
+
record?: DnsGetResponseRecordList | null;
|
|
977
|
+
}
|
|
871
978
|
export const GetDnsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
872
|
-
S.Struct({
|
|
979
|
+
S.Struct({
|
|
980
|
+
errors: S.optional(S.NullOr(DnsGetResponseErrorsList)),
|
|
981
|
+
record: S.optional(S.NullOr(DnsGetResponseRecordList)),
|
|
982
|
+
}).pipe(T.KeyDictionary(KEY_DICTIONARY)),
|
|
873
983
|
).annotate({ identifier: "GetDnsResponse" }) as any as S.Schema<GetDnsResponse>;
|
|
874
984
|
|
|
875
985
|
export interface GetEmailRoutingRequest {
|
|
@@ -1865,7 +1975,7 @@ export const createDns: API.OperationMethod<
|
|
|
1865
1975
|
retry: Retry.Retry,
|
|
1866
1976
|
}));
|
|
1867
1977
|
|
|
1868
|
-
export type CreateRuleError = CloudflareOpError;
|
|
1978
|
+
export type CreateRuleError = WorkerScriptNotFound | CloudflareOpError;
|
|
1869
1979
|
/** Rules consist of a set of criteria for matching emails (such as an email being sent to a specific custom email address) plus a set of actions to take on the email (like forwarding it to a specific destination address). Forward actions require all destination addresses to be verified. */
|
|
1870
1980
|
export const createRule: API.OperationMethod<
|
|
1871
1981
|
CreateRuleRequest,
|
|
@@ -1875,7 +1985,7 @@ export const createRule: API.OperationMethod<
|
|
|
1875
1985
|
> = /*@__PURE__*/ API.make(() => ({
|
|
1876
1986
|
input: CreateRuleRequest,
|
|
1877
1987
|
output: CreateRuleResponse,
|
|
1878
|
-
errors: [CloudflareRateLimited, CloudflareError],
|
|
1988
|
+
errors: [WorkerScriptNotFound, CloudflareRateLimited, CloudflareError],
|
|
1879
1989
|
protocol: CloudflareProtocol,
|
|
1880
1990
|
retry: Retry.Retry,
|
|
1881
1991
|
}));
|
|
@@ -2008,7 +2118,10 @@ export const getEmailRouting: API.OperationMethod<
|
|
|
2008
2118
|
retry: Retry.Retry,
|
|
2009
2119
|
}));
|
|
2010
2120
|
|
|
2011
|
-
export type GetRuleError =
|
|
2121
|
+
export type GetRuleError =
|
|
2122
|
+
| Forbidden
|
|
2123
|
+
| EmailRoutingRuleNotFound
|
|
2124
|
+
| CloudflareOpError;
|
|
2012
2125
|
/** Get information for a specific routing rule already created. */
|
|
2013
2126
|
export const getRule: API.OperationMethod<
|
|
2014
2127
|
GetRuleRequest,
|
|
@@ -2018,7 +2131,12 @@ export const getRule: API.OperationMethod<
|
|
|
2018
2131
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2019
2132
|
input: GetRuleRequest,
|
|
2020
2133
|
output: GetRuleResponse,
|
|
2021
|
-
errors: [
|
|
2134
|
+
errors: [
|
|
2135
|
+
Forbidden,
|
|
2136
|
+
EmailRoutingRuleNotFound,
|
|
2137
|
+
CloudflareRateLimited,
|
|
2138
|
+
CloudflareError,
|
|
2139
|
+
],
|
|
2022
2140
|
protocol: CloudflareProtocol,
|
|
2023
2141
|
retry: Retry.Retry,
|
|
2024
2142
|
}));
|
|
@@ -2108,6 +2226,7 @@ export const patchDns: API.OperationMethod<
|
|
|
2108
2226
|
export type PutRuleCatchAllError =
|
|
2109
2227
|
| Forbidden
|
|
2110
2228
|
| DestinationNotVerified
|
|
2229
|
+
| WorkerScriptNotFound
|
|
2111
2230
|
| CloudflareOpError;
|
|
2112
2231
|
/** Enable or disable catch-all routing rule, or change action to forward to specific destination address. Forward actions require all destination addresses to be verified. */
|
|
2113
2232
|
export const putRuleCatchAll: API.OperationMethod<
|
|
@@ -2121,6 +2240,7 @@ export const putRuleCatchAll: API.OperationMethod<
|
|
|
2121
2240
|
errors: [
|
|
2122
2241
|
Forbidden,
|
|
2123
2242
|
DestinationNotVerified,
|
|
2243
|
+
WorkerScriptNotFound,
|
|
2124
2244
|
CloudflareRateLimited,
|
|
2125
2245
|
CloudflareError,
|
|
2126
2246
|
],
|
|
@@ -2143,7 +2263,7 @@ export const unlock: API.OperationMethod<
|
|
|
2143
2263
|
retry: Retry.Retry,
|
|
2144
2264
|
}));
|
|
2145
2265
|
|
|
2146
|
-
export type UpdateRuleError = CloudflareOpError;
|
|
2266
|
+
export type UpdateRuleError = WorkerScriptNotFound | CloudflareOpError;
|
|
2147
2267
|
/** Update actions and matches, or enable/disable specific routing rules. Forward actions require all destination addresses to be verified. */
|
|
2148
2268
|
export const updateRule: API.OperationMethod<
|
|
2149
2269
|
UpdateRuleRequest,
|
|
@@ -2153,7 +2273,7 @@ export const updateRule: API.OperationMethod<
|
|
|
2153
2273
|
> = /*@__PURE__*/ API.make(() => ({
|
|
2154
2274
|
input: UpdateRuleRequest,
|
|
2155
2275
|
output: UpdateRuleResponse,
|
|
2156
|
-
errors: [CloudflareRateLimited, CloudflareError],
|
|
2276
|
+
errors: [WorkerScriptNotFound, CloudflareRateLimited, CloudflareError],
|
|
2157
2277
|
protocol: CloudflareProtocol,
|
|
2158
2278
|
retry: Retry.Retry,
|
|
2159
2279
|
}));
|
package/src/services/logs.ts
CHANGED
|
@@ -600,10 +600,98 @@ export const ListLogExplorerDatasetAvailablesForAccountRequest =
|
|
|
600
600
|
identifier: "ListLogExplorerDatasetAvailablesForAccountRequest",
|
|
601
601
|
}) as any as S.Schema<ListLogExplorerDatasetAvailablesForAccountRequest>;
|
|
602
602
|
|
|
603
|
-
|
|
604
|
-
|
|
603
|
+
export type LogExplorerDatasetsAvailableListResultItemObjectType =
|
|
604
|
+
| "account"
|
|
605
|
+
| "zone";
|
|
606
|
+
export const LogExplorerDatasetsAvailableListResultItemObjectType =
|
|
607
|
+
/*@__PURE__*/ S.String;
|
|
608
|
+
|
|
609
|
+
export type LogExplorerDatasetsAvailableListResultItemSchemaPropertiesMap = {
|
|
610
|
+
[key: string]: unknown | undefined;
|
|
611
|
+
};
|
|
612
|
+
export const LogExplorerDatasetsAvailableListResultItemSchemaPropertiesMap =
|
|
613
|
+
/*@__PURE__*/ S.Record(
|
|
614
|
+
S.String,
|
|
615
|
+
S.Unknown,
|
|
616
|
+
) as any as S.Schema<LogExplorerDatasetsAvailableListResultItemSchemaPropertiesMap>;
|
|
617
|
+
|
|
618
|
+
export type LogExplorerDatasetsAvailableListResultItemSchemaRequiredList =
|
|
619
|
+
Array<string>;
|
|
620
|
+
export const LogExplorerDatasetsAvailableListResultItemSchemaRequiredList =
|
|
621
|
+
/*@__PURE__*/ S.Array(
|
|
622
|
+
S.String,
|
|
623
|
+
) as any as S.Schema<LogExplorerDatasetsAvailableListResultItemSchemaRequiredList>;
|
|
624
|
+
|
|
625
|
+
export type LogExplorerDatasetsAvailableListResultItemSchemaType = "object";
|
|
626
|
+
export const LogExplorerDatasetsAvailableListResultItemSchemaType =
|
|
627
|
+
/*@__PURE__*/ S.String;
|
|
628
|
+
|
|
629
|
+
export interface LogExplorerDatasetsAvailableListResultItemSchema {
|
|
630
|
+
properties?: LogExplorerDatasetsAvailableListResultItemSchemaPropertiesMap | null;
|
|
631
|
+
required?: LogExplorerDatasetsAvailableListResultItemSchemaRequiredList | null;
|
|
632
|
+
type?: LogExplorerDatasetsAvailableListResultItemSchemaType | null;
|
|
633
|
+
}
|
|
634
|
+
export const LogExplorerDatasetsAvailableListResultItemSchema =
|
|
635
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
636
|
+
S.Struct({
|
|
637
|
+
properties: S.optional(
|
|
638
|
+
S.NullOr(LogExplorerDatasetsAvailableListResultItemSchemaPropertiesMap),
|
|
639
|
+
),
|
|
640
|
+
required: S.optional(
|
|
641
|
+
S.NullOr(LogExplorerDatasetsAvailableListResultItemSchemaRequiredList),
|
|
642
|
+
),
|
|
643
|
+
type: S.optional(
|
|
644
|
+
S.NullOr(LogExplorerDatasetsAvailableListResultItemSchemaType),
|
|
645
|
+
),
|
|
646
|
+
}),
|
|
647
|
+
).annotate({
|
|
648
|
+
identifier: "LogExplorerDatasetsAvailableListResultItemSchema",
|
|
649
|
+
}) as any as S.Schema<LogExplorerDatasetsAvailableListResultItemSchema>;
|
|
650
|
+
|
|
651
|
+
export interface LogExplorerDatasetsAvailableListResultItem {
|
|
652
|
+
/** Dataset type name (e.g. `http_requests`). */
|
|
653
|
+
dataset: string;
|
|
654
|
+
/** Whether this dataset type is account-scoped or zone-scoped. */
|
|
655
|
+
objectType: LogExplorerDatasetsAvailableListResultItemObjectType;
|
|
656
|
+
/** JSON Schema that describes the fields this dataset exposes. */
|
|
657
|
+
schema: LogExplorerDatasetsAvailableListResultItemSchema;
|
|
658
|
+
/** The primary timestamp field name for this dataset. */
|
|
659
|
+
timestampField: string;
|
|
660
|
+
}
|
|
661
|
+
export const LogExplorerDatasetsAvailableListResultItem =
|
|
662
|
+
/*@__PURE__*/ S.suspend(() =>
|
|
663
|
+
S.Struct({
|
|
664
|
+
dataset: S.String,
|
|
665
|
+
objectType: LogExplorerDatasetsAvailableListResultItemObjectType.pipe(
|
|
666
|
+
T.Body("object_type"),
|
|
667
|
+
),
|
|
668
|
+
schema: LogExplorerDatasetsAvailableListResultItemSchema,
|
|
669
|
+
timestampField: S.String.pipe(T.Body("timestamp_field")),
|
|
670
|
+
}),
|
|
671
|
+
).annotate({
|
|
672
|
+
identifier: "LogExplorerDatasetsAvailableListResultItem",
|
|
673
|
+
}) as any as S.Schema<LogExplorerDatasetsAvailableListResultItem>;
|
|
674
|
+
|
|
675
|
+
export type LogExplorerDatasetsAvailableListResultList =
|
|
676
|
+
Array<LogExplorerDatasetsAvailableListResultItem>;
|
|
677
|
+
export const LogExplorerDatasetsAvailableListResultList = /*@__PURE__*/ S.Array(
|
|
678
|
+
LogExplorerDatasetsAvailableListResultItem,
|
|
679
|
+
) as any as S.Schema<LogExplorerDatasetsAvailableListResultList>;
|
|
680
|
+
|
|
681
|
+
export interface ListLogExplorerDatasetAvailablesResponse {
|
|
682
|
+
/** The unwrapped `result` payload of the v4 response envelope. */
|
|
683
|
+
result: LogExplorerDatasetsAvailableListResultList;
|
|
684
|
+
/** Pagination info from the envelope's `result_info`. */
|
|
685
|
+
resultInfo?: ResultInfo | null;
|
|
686
|
+
}
|
|
605
687
|
export const ListLogExplorerDatasetAvailablesResponse = /*@__PURE__*/ S.suspend(
|
|
606
|
-
() =>
|
|
688
|
+
() =>
|
|
689
|
+
S.Struct({
|
|
690
|
+
result: LogExplorerDatasetsAvailableListResultList.pipe(
|
|
691
|
+
T.EnvelopePayload(),
|
|
692
|
+
),
|
|
693
|
+
resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())),
|
|
694
|
+
}).pipe(T.KeyDictionary(KEY_DICTIONARY)),
|
|
607
695
|
).annotate({
|
|
608
696
|
identifier: "ListLogExplorerDatasetAvailablesResponse",
|
|
609
697
|
}) as any as S.Schema<ListLogExplorerDatasetAvailablesResponse>;
|
|
@@ -1151,33 +1239,43 @@ export const getReceivedField: API.OperationMethod<
|
|
|
1151
1239
|
|
|
1152
1240
|
export type ListLogExplorerDatasetAvailablesForAccountError = CloudflareOpError;
|
|
1153
1241
|
/** Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error. */
|
|
1154
|
-
export const listLogExplorerDatasetAvailablesForAccount: API.
|
|
1242
|
+
export const listLogExplorerDatasetAvailablesForAccount: API.PaginatedOperationMethod<
|
|
1155
1243
|
ListLogExplorerDatasetAvailablesForAccountRequest,
|
|
1156
1244
|
ListLogExplorerDatasetAvailablesResponse,
|
|
1157
1245
|
ListLogExplorerDatasetAvailablesForAccountError,
|
|
1158
|
-
CloudflareOpContext
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1246
|
+
CloudflareOpContext,
|
|
1247
|
+
LogExplorerDatasetsAvailableListResultItem
|
|
1248
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
1249
|
+
() => ({
|
|
1250
|
+
input: ListLogExplorerDatasetAvailablesForAccountRequest,
|
|
1251
|
+
output: ListLogExplorerDatasetAvailablesResponse,
|
|
1252
|
+
errors: [CloudflareRateLimited, CloudflareError],
|
|
1253
|
+
protocol: CloudflarePaginatedProtocol,
|
|
1254
|
+
retry: Retry.Retry,
|
|
1255
|
+
pagination: { mode: "single", items: "result" } as const,
|
|
1256
|
+
}),
|
|
1257
|
+
cloudflarePaginate,
|
|
1258
|
+
) as any;
|
|
1166
1259
|
|
|
1167
1260
|
export type ListLogExplorerDatasetAvailablesForZoneError = CloudflareOpError;
|
|
1168
1261
|
/** Returns all dataset types that this account or zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error. */
|
|
1169
|
-
export const listLogExplorerDatasetAvailablesForZone: API.
|
|
1262
|
+
export const listLogExplorerDatasetAvailablesForZone: API.PaginatedOperationMethod<
|
|
1170
1263
|
ListLogExplorerDatasetAvailablesForZoneRequest,
|
|
1171
1264
|
ListLogExplorerDatasetAvailablesResponse,
|
|
1172
1265
|
ListLogExplorerDatasetAvailablesForZoneError,
|
|
1173
|
-
CloudflareOpContext
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1266
|
+
CloudflareOpContext,
|
|
1267
|
+
LogExplorerDatasetsAvailableListResultItem
|
|
1268
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
1269
|
+
() => ({
|
|
1270
|
+
input: ListLogExplorerDatasetAvailablesForZoneRequest,
|
|
1271
|
+
output: ListLogExplorerDatasetAvailablesResponse,
|
|
1272
|
+
errors: [CloudflareRateLimited, CloudflareError],
|
|
1273
|
+
protocol: CloudflarePaginatedProtocol,
|
|
1274
|
+
retry: Retry.Retry,
|
|
1275
|
+
pagination: { mode: "single", items: "result" } as const,
|
|
1276
|
+
}),
|
|
1277
|
+
cloudflarePaginate,
|
|
1278
|
+
) as any;
|
|
1181
1279
|
|
|
1182
1280
|
export type ListLogExplorerDatasetsForAccountError = CloudflareOpError;
|
|
1183
1281
|
/** Returns all Log Explorer datasets configured for the account or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration. */
|
|
@@ -4,9 +4,11 @@ import * as API from "@distilled.cloud/core/api";
|
|
|
4
4
|
import * as T from "../traits.ts";
|
|
5
5
|
import {
|
|
6
6
|
CloudflareProtocol,
|
|
7
|
+
CloudflarePaginatedProtocol,
|
|
7
8
|
type CloudflareOpError,
|
|
8
9
|
type CloudflareOpContext,
|
|
9
10
|
} from "../protocol.ts";
|
|
11
|
+
import { cloudflarePaginate, ResultInfo } from "../pagination.ts";
|
|
10
12
|
import { CloudflareError, CloudflareRateLimited } from "../errors.ts";
|
|
11
13
|
import * as Retry from "../retry.ts";
|
|
12
14
|
|
|
@@ -448,10 +450,101 @@ export const ListMembershipsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
448
450
|
identifier: "ListMembershipsRequest",
|
|
449
451
|
}) as any as S.Schema<ListMembershipsRequest>;
|
|
450
452
|
|
|
451
|
-
|
|
452
|
-
export
|
|
453
|
+
export type ListResultItemAccountType = "standard" | "enterprise";
|
|
454
|
+
export const ListResultItemAccountType = /*@__PURE__*/ S.String;
|
|
455
|
+
|
|
456
|
+
export type ListResultItemAccountManagedBy = GetResponseAccountManagedBy;
|
|
457
|
+
export const ListResultItemAccountManagedBy = GetResponseAccountManagedBy;
|
|
458
|
+
|
|
459
|
+
export type ListResultItemAccountSettings = GetResponseAccountSettings;
|
|
460
|
+
export const ListResultItemAccountSettings = GetResponseAccountSettings;
|
|
461
|
+
|
|
462
|
+
export interface ListResultItemAccount {
|
|
463
|
+
/** Identifier */
|
|
464
|
+
id: string;
|
|
465
|
+
/** Account name */
|
|
466
|
+
name: string;
|
|
467
|
+
type: ListResultItemAccountType;
|
|
468
|
+
/** Timestamp for the creation of the account */
|
|
469
|
+
createdOn?: string | null;
|
|
470
|
+
/** Parent container details */
|
|
471
|
+
managedBy?: GetResponseAccountManagedBy | null;
|
|
472
|
+
/** Account settings */
|
|
473
|
+
settings?: GetResponseAccountSettings | null;
|
|
474
|
+
}
|
|
475
|
+
export const ListResultItemAccount = /*@__PURE__*/ S.suspend(() =>
|
|
476
|
+
S.Struct({
|
|
477
|
+
id: S.String,
|
|
478
|
+
name: S.String,
|
|
479
|
+
type: ListResultItemAccountType,
|
|
480
|
+
createdOn: S.optional(S.NullOr(S.String).pipe(T.Body("created_on"))),
|
|
481
|
+
managedBy: S.optional(
|
|
482
|
+
S.NullOr(GetResponseAccountManagedBy).pipe(T.Body("managed_by")),
|
|
483
|
+
),
|
|
484
|
+
settings: S.optional(S.NullOr(GetResponseAccountSettings)),
|
|
485
|
+
}),
|
|
486
|
+
).annotate({
|
|
487
|
+
identifier: "ListResultItemAccount",
|
|
488
|
+
}) as any as S.Schema<ListResultItemAccount>;
|
|
489
|
+
|
|
490
|
+
export type ListResultItemPermissionsAnalytics =
|
|
491
|
+
GetResponsePermissionsAnalytics;
|
|
492
|
+
export const ListResultItemPermissionsAnalytics =
|
|
493
|
+
GetResponsePermissionsAnalytics;
|
|
494
|
+
|
|
495
|
+
export type ListResultItemPermissions = GetResponsePermissions;
|
|
496
|
+
export const ListResultItemPermissions = GetResponsePermissions;
|
|
497
|
+
|
|
498
|
+
export type ListResultItemRolesList = Array<string>;
|
|
499
|
+
export const ListResultItemRolesList = /*@__PURE__*/ S.Array(
|
|
500
|
+
S.String,
|
|
501
|
+
) as any as S.Schema<ListResultItemRolesList>;
|
|
502
|
+
|
|
503
|
+
export type ListResultItemStatus = "accepted" | "pending" | "rejected";
|
|
504
|
+
export const ListResultItemStatus = /*@__PURE__*/ S.String;
|
|
505
|
+
|
|
506
|
+
export interface ListResultItem {
|
|
507
|
+
/** Membership identifier tag. */
|
|
508
|
+
id?: string | null;
|
|
509
|
+
account?: ListResultItemAccount | null;
|
|
510
|
+
/** Enterprise only. Indicates whether or not API access is enabled specifically for this user on a given account. */
|
|
511
|
+
apiAccessEnabled?: boolean | null;
|
|
512
|
+
/** All access permissions for the user at the account. */
|
|
513
|
+
permissions?: GetResponsePermissions | null;
|
|
514
|
+
/** List of role names the membership has for this account. */
|
|
515
|
+
roles?: ListResultItemRolesList | null;
|
|
516
|
+
/** Status of this membership. */
|
|
517
|
+
status?: ListResultItemStatus | null;
|
|
518
|
+
}
|
|
519
|
+
export const ListResultItem = /*@__PURE__*/ S.suspend(() =>
|
|
520
|
+
S.Struct({
|
|
521
|
+
id: S.optional(S.NullOr(S.String)),
|
|
522
|
+
account: S.optional(S.NullOr(ListResultItemAccount)),
|
|
523
|
+
apiAccessEnabled: S.optional(
|
|
524
|
+
S.NullOr(S.Boolean).pipe(T.Body("api_access_enabled")),
|
|
525
|
+
),
|
|
526
|
+
permissions: S.optional(S.NullOr(GetResponsePermissions)),
|
|
527
|
+
roles: S.optional(S.NullOr(ListResultItemRolesList)),
|
|
528
|
+
status: S.optional(S.NullOr(ListResultItemStatus)),
|
|
529
|
+
}),
|
|
530
|
+
).annotate({ identifier: "ListResultItem" }) as any as S.Schema<ListResultItem>;
|
|
531
|
+
|
|
532
|
+
export type ListResultList = Array<ListResultItem>;
|
|
533
|
+
export const ListResultList = /*@__PURE__*/ S.Array(
|
|
534
|
+
ListResultItem,
|
|
535
|
+
) as any as S.Schema<ListResultList>;
|
|
536
|
+
|
|
537
|
+
export interface ListMembershipsResponse {
|
|
538
|
+
/** The unwrapped `result` payload of the v4 response envelope. */
|
|
539
|
+
result: ListResultList;
|
|
540
|
+
/** Pagination info from the envelope's `result_info`. */
|
|
541
|
+
resultInfo?: ResultInfo | null;
|
|
542
|
+
}
|
|
453
543
|
export const ListMembershipsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
454
|
-
S.Struct({
|
|
544
|
+
S.Struct({
|
|
545
|
+
result: ListResultList.pipe(T.EnvelopePayload()),
|
|
546
|
+
resultInfo: S.optional(S.NullOr(ResultInfo).pipe(T.ResultInfo())),
|
|
547
|
+
}).pipe(T.KeyDictionary(KEY_DICTIONARY)),
|
|
455
548
|
).annotate({
|
|
456
549
|
identifier: "ListMembershipsResponse",
|
|
457
550
|
}) as any as S.Schema<ListMembershipsResponse>;
|
|
@@ -720,18 +813,29 @@ export const getMembership: API.OperationMethod<
|
|
|
720
813
|
|
|
721
814
|
export type ListMembershipsError = CloudflareOpError;
|
|
722
815
|
/** List memberships of accounts the user can access. */
|
|
723
|
-
export const listMemberships: API.
|
|
816
|
+
export const listMemberships: API.PaginatedOperationMethod<
|
|
724
817
|
ListMembershipsRequest,
|
|
725
818
|
ListMembershipsResponse,
|
|
726
819
|
ListMembershipsError,
|
|
727
|
-
CloudflareOpContext
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
820
|
+
CloudflareOpContext,
|
|
821
|
+
ListResultItem
|
|
822
|
+
> = /*@__PURE__*/ API.makePaginated(
|
|
823
|
+
() => ({
|
|
824
|
+
input: ListMembershipsRequest,
|
|
825
|
+
output: ListMembershipsResponse,
|
|
826
|
+
errors: [CloudflareRateLimited, CloudflareError],
|
|
827
|
+
protocol: CloudflarePaginatedProtocol,
|
|
828
|
+
retry: Retry.Retry,
|
|
829
|
+
pagination: {
|
|
830
|
+
mode: "page",
|
|
831
|
+
inputToken: "page",
|
|
832
|
+
outputToken: "resultInfo.page",
|
|
833
|
+
items: "result",
|
|
834
|
+
pageSize: "perPage",
|
|
835
|
+
} as const,
|
|
836
|
+
}),
|
|
837
|
+
cloudflarePaginate,
|
|
838
|
+
) as any;
|
|
735
839
|
|
|
736
840
|
export type PutMembershipError = CloudflareOpError;
|
|
737
841
|
/** Accept or reject this account invitation. */
|