@distilled.cloud/steel 1.0.0-rc.20 → 1.0.0-rc.21
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 +9 -6
- package/lib/.lazy.json +1 -1
- package/lib/_bundle/sdk.js +1 -1
- package/lib/_bundle/sdk.js.map +1 -1
- package/lib/credentials.d.ts +8 -3
- package/lib/credentials.d.ts.map +1 -1
- package/lib/errors.d.ts +7 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts +2 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/pagination.d.ts.map +1 -1
- package/lib/protocol.d.ts +9 -12
- package/lib/protocol.d.ts.map +1 -1
- package/lib/retry.d.ts.map +1 -1
- package/lib/services/api_keys.d.ts +38 -0
- package/lib/services/api_keys.d.ts.map +1 -1
- package/lib/services/api_keys.js +1 -1
- package/lib/services/api_keys.js.map +1 -1
- package/lib/services/auth.d.ts.map +1 -1
- package/lib/services/auth.js +1 -1
- package/lib/services/auth.js.map +1 -1
- package/lib/services/browser_tools.d.ts +35 -0
- package/lib/services/browser_tools.d.ts.map +1 -1
- package/lib/services/browser_tools.js +1 -1
- package/lib/services/browser_tools.js.map +1 -1
- package/lib/services/captchas.d.ts +32 -0
- package/lib/services/captchas.d.ts.map +1 -1
- package/lib/services/captchas.js +1 -1
- package/lib/services/captchas.js.map +1 -1
- package/lib/services/credentials.d.ts +54 -0
- package/lib/services/credentials.d.ts.map +1 -1
- package/lib/services/credentials.js +1 -1
- package/lib/services/credentials.js.map +1 -1
- package/lib/services/extensions.d.ts +47 -1
- package/lib/services/extensions.d.ts.map +1 -1
- package/lib/services/extensions.js +1 -1
- package/lib/services/extensions.js.map +1 -1
- package/lib/services/files.d.ts +57 -3
- package/lib/services/files.d.ts.map +1 -1
- package/lib/services/files.js +1 -1
- package/lib/services/files.js.map +1 -1
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +2 -0
- package/lib/services/profiles.d.ts +64 -5
- package/lib/services/profiles.d.ts.map +1 -1
- package/lib/services/profiles.js +1 -1
- package/lib/services/profiles.js.map +1 -1
- package/lib/services/projects.d.ts +32 -0
- package/lib/services/projects.d.ts.map +1 -1
- package/lib/services/projects.js +1 -1
- package/lib/services/projects.js.map +1 -1
- package/lib/services/secret_connections.d.ts +233 -0
- package/lib/services/secret_connections.d.ts.map +1 -0
- package/lib/services/secret_connections.js +2 -0
- package/lib/services/secret_connections.js.map +1 -0
- package/lib/services/sessions.d.ts +526 -233
- package/lib/services/sessions.d.ts.map +1 -1
- package/lib/services/sessions.js +50 -41
- package/lib/services/sessions.js.map +1 -1
- package/lib/services/vaults.d.ts +149 -0
- package/lib/services/vaults.d.ts.map +1 -0
- package/lib/services/vaults.js +2 -0
- package/lib/services/vaults.js.map +1 -0
- package/lib/services.lazy/index.js +2 -2
- package/lib/services.lazy/secret_connections.js +1 -0
- package/lib/services.lazy/sessions.js +2 -2
- package/lib/services.lazy/vaults.js +1 -0
- package/lib/traits.d.ts.map +1 -1
- package/package.json +5 -6
- package/src/credentials.ts +18 -12
- package/src/errors.ts +9 -1
- package/src/index.ts +2 -3
- package/src/protocol.ts +13 -24
- package/src/services/api_keys.ts +87 -7
- package/src/services/auth.ts +3 -2
- package/src/services/browser_tools.ts +101 -28
- package/src/services/captchas.ts +85 -17
- package/src/services/credentials.ts +129 -25
- package/src/services/extensions.ts +136 -34
- package/src/services/files.ts +172 -58
- package/src/services/index.ts +2 -0
- package/src/services/profiles.ts +198 -60
- package/src/services/projects.ts +79 -12
- package/src/services/secret_connections.ts +538 -0
- package/src/services/sessions.ts +1384 -794
- package/src/services/vaults.ts +369 -0
- package/lib/index.lazy.js +0 -7
- package/lib/index.lazy.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captchas.d.ts","
|
|
1
|
+
{"version":3,"file":"captchas.d.ts","sources":["../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C,qGAAqG;IACrG,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AACD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,YAAY,CAAC;AAC9D,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,CAUb,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,YAAY,CAAC;AAC1D,2PAA2P;AAC3P,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,eAAe,CAC5C,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,CAUb,CAAC;AAEJ,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,YAAY,CAAC;AAC/D,wEAAwE;AACxE,eAAO,MAAM,iBAAiB,EAAE,GAAG,CAAC,eAAe,CACjD,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,cAAc,CAUb,CAAC"}
|
package/lib/services/captchas.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Gc as e,Hc as t,Jc as n,Kc as r,Mc as i,Oc as a,Pc as o,Rc as s,Wc as c,Xc as l,a as u,b as d,errors$SteelServiceErrors as f,f as p,l as m,m as h,n as g,protocol$SteelProtocol as _,retry$Retry as v,traits$Http as y,traits$Label as b,traits$RawResponseRoot as x,traits$applyErrorMatchers as S,wc as C,xc as w,za as T}from"../_bundle/sdk.js";const E={system:`steel-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Steel`,service:`Captchas`,labels:`steel`,propagate:`w3c`};const D=/*@__PURE__*/ p(function BadRequest(u){return h(u,new.target,[`$13($12()("BadRequest",{code:$8,message:$1,body:$7($11([$4(>7),$1])),headers:$7($6($1,$1))}).pipe($10),[{status:400}]);$4(>5)@"ErrorResponseContextItem";$5(#1);$6($1,$2);$4(>6)@"ErrorResponse";$3({keyword:$1,message:$1,params:$2});$3({code:$7($1),context:$7(#2),details:$7(#3),error:$7($1),linkToDocs:$7($1),message:$1,param:$7($1),retryAfterSeconds:$7($8),retryable:$7($9),unlockUrl:$7($1)});#4`,[s,n,o,r,l,C,t,c,e,w,T,a,i,S]])});const O=/*@__PURE__*/ g(t=>t===u?m(`GetCaptchaStatus`,`{input:#1,output:#5,errors:[$12],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"%"};$5(>6)@"%Request";$7($6);$5(>7)@"CaptchaStateResponseItem";$7(#3);$5(>8)@"%Response";$4({sessionId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/sessions/{sessionId}/captchas/status",code:200}));$4({created:$9($8),isSolvingCaptcha:$10,lastUpdated:$9($8),pageId:$3,tasks:#2,url:$3});#4.pipe($11())`,[s,y,b,n,r,l,o,C,e,c,w,x,D,f,_,v,E]):d(O,t));const k=/*@__PURE__*/ g(e=>e===u?m(`SolveCaptcha`,`{input:#1,output:#7:0,errors:[$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$6(>2)@"%Request";$5({sessionId:$3.pipe($2()),pageId:$4($3),taskId:$4($3),url:$4($3)}).pipe($1({method:"POST",uri:"/v1/sessions/{sessionId}/captchas/solve",code:200}))`,[s,y,b,n,c,r,l,__d0,D,f,_,v,E]):d(k,e));const A=/*@__PURE__*/ g(e=>e===u?m(`SolveImageCaptcha`,`{input:#1,output:#7:0,errors:[$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$6(>2)@"%Request";$5({sessionId:$3.pipe($2()),imageXPath:$3,inputXPath:$3,url:$4($3)}).pipe($1({method:"POST",uri:"/v1/sessions/{sessionId}/captchas/solve-image",code:200}))`,[s,y,b,n,c,r,l,__d0,D,f,_,v,E]):d(A,e));function __d0(){return[`$5(>1)@"CaptchaActionResponse";$4({message:$2($1),success:$3})`,[s,n,c,w,r,l]]}export{D as BadRequest,O as getCaptchaStatus,k as solveCaptcha,A as solveImageCaptcha};
|
|
2
2
|
//# sourceMappingURL=captchas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captchas.js","names":["API.newError","__L.at","
|
|
1
|
+
{"version":3,"file":"captchas.js","names":["API.newError","__L.at","S.String","S.Unknown","S.Struct","S.suspend","S.Array","S.Record","S.optional","S.Number","S.Boolean","C.withBadRequestError","S.Union","S.TaggedError","T.applyErrorMatchers","API.D","API.named","T.Http","T.Label","T.RawResponseRoot","Retry.Retry","API.call","Number","Record","String","Struct","TaggedError","Union","Unknown","at","optional","suspend","D","call","SteelServiceErrors","error","named","newError","op","SteelProtocol","Retry","Http","Label","RawResponseRoot","applyErrorMatchers","Array","Boolean","withBadRequestError","TELEMETRY","BadRequest","i","getCaptchaStatus","solveCaptcha","solveImageCaptcha"],"sources":["../../src/services/captchas.ts"],"mappings":"2VAaA,MAAMgD,EAAY,CAChB,OAAQ,YACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,QACR,QAAS,WACT,OAAQ,QACR,UAAW,KACb,EAEA,MAAaC,EAAgC,gBAAU,SAAS,WAAW,EAAa,CACtF,OAAOjD,EAAakD,EAAG,WAAY,CAAC,8YAA+Y,CAACjD,EAAQC,EAAUC,EAAWC,EAAUC,EAAWC,EAASC,EAAUC,EAAYC,EAAUC,EAAWC,EAAuBC,EAASC,EAAeC,CAAoB,CAAC,CAAC,CACjmB,CAAC,EA+ED,MAAaqC,EAKK,gBAAQ,GAAgBD,IAAMnC,EAAQC,EAAU,mBAAoB,8YAA+Y,CAACf,EAAQgB,EAAQC,EAAShB,EAAUE,EAAUC,EAAWF,EAAWG,EAASG,EAAUD,EAAYE,EAAWS,EAAmB8B,EAAYf,EAAoBK,EAAenB,EAAa4B,CAAS,CAAC,EAAI3B,EAAS8B,EAAkBD,CAAC,CAAC,EAI7sB,MAAaE,EAKK,gBAAQ,GAAgBF,IAAMnC,EAAQC,EAAU,eAAgB,4QAA6Q,CAACf,EAAQgB,EAAQC,EAAShB,EAAUM,EAAYJ,EAAUC,EAAW,KAAM4C,EAAYf,EAAoBK,EAAenB,EAAa4B,CAAS,CAAC,EAAI3B,EAAS+B,EAAcF,CAAC,CAAC,EAI7gB,MAAaG,EAKK,gBAAQ,GAAgBH,IAAMnC,EAAQC,EAAU,oBAAqB,kRAAmR,CAACf,EAAQgB,EAAQC,EAAShB,EAAUM,EAAYJ,EAAUC,EAAW,KAAM4C,EAAYf,EAAoBK,EAAenB,EAAa4B,CAAS,CAAC,EAAI3B,EAASgC,EAAmBH,CAAC,CAAC,EAM7hB,SAAS,MAAY,CACnB,MAAO,CAAC,iEAAkE,CAACjD,EAAQC,EAAUM,EAAYE,EAAWN,EAAUC,CAAS,CAAC,CAC1I"}
|
|
@@ -6,38 +6,51 @@ export type { SteelOpError, SteelOpContext };
|
|
|
6
6
|
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
7
7
|
readonly code: any;
|
|
8
8
|
readonly message: any;
|
|
9
|
+
readonly body: any;
|
|
10
|
+
readonly headers: any;
|
|
9
11
|
}> & (new (...args: any[]) => {
|
|
10
12
|
"@distilled.cloud/error/categories": {
|
|
11
13
|
BadRequestError: true;
|
|
12
14
|
};
|
|
13
15
|
});
|
|
14
16
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
17
|
+
readonly body?: ErrorResponse | string;
|
|
15
18
|
}
|
|
16
19
|
declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
|
|
17
20
|
readonly code: any;
|
|
18
21
|
readonly message: any;
|
|
22
|
+
readonly body: any;
|
|
23
|
+
readonly headers: any;
|
|
19
24
|
}> & (new (...args: any[]) => {
|
|
20
25
|
"@distilled.cloud/error/categories": {
|
|
21
26
|
ConflictError: true;
|
|
22
27
|
};
|
|
23
28
|
});
|
|
24
29
|
export declare class Conflict extends /*@__PURE__*/ Conflict_base {
|
|
30
|
+
readonly body?: ErrorResponse | string;
|
|
25
31
|
}
|
|
26
32
|
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
27
33
|
readonly code: any;
|
|
28
34
|
readonly message: any;
|
|
35
|
+
readonly body: any;
|
|
36
|
+
readonly headers: any;
|
|
29
37
|
}> & (new (...args: any[]) => {
|
|
30
38
|
"@distilled.cloud/error/categories": {
|
|
31
39
|
BadRequestError: true;
|
|
32
40
|
};
|
|
33
41
|
});
|
|
34
42
|
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
43
|
+
readonly body?: ErrorResponse | string;
|
|
35
44
|
}
|
|
45
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. */
|
|
46
|
+
export type CreateCredentialRequestAdditionalOriginsList = Array<string>;
|
|
36
47
|
/** Value for the credential */
|
|
37
48
|
export type CreateCredentialRequestValueMap = {
|
|
38
49
|
[key: string]: string | Redacted.Redacted<string> | undefined;
|
|
39
50
|
};
|
|
40
51
|
export interface CreateCredentialRequest {
|
|
52
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. */
|
|
53
|
+
additionalOrigins?: CreateCredentialRequestAdditionalOriginsList | undefined;
|
|
41
54
|
/** Label for the credential */
|
|
42
55
|
label?: string | undefined;
|
|
43
56
|
/** The namespace the credential is stored against. Defaults to "default". */
|
|
@@ -49,7 +62,11 @@ export interface CreateCredentialRequest {
|
|
|
49
62
|
/** Value for the credential */
|
|
50
63
|
value: CreateCredentialRequestValueMap;
|
|
51
64
|
}
|
|
65
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. */
|
|
66
|
+
export type CredentialMetadataAdditionalOriginsList = Array<string>;
|
|
52
67
|
export interface CredentialMetadata {
|
|
68
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. */
|
|
69
|
+
additionalOrigins?: CredentialMetadataAdditionalOriginsList | undefined;
|
|
53
70
|
/** Date and time the credential was created */
|
|
54
71
|
createdAt: string;
|
|
55
72
|
/** Label for the credential */
|
|
@@ -80,7 +97,11 @@ export interface ListCredentialsRequest {
|
|
|
80
97
|
/** website origin the credential is for */
|
|
81
98
|
origin?: string | undefined;
|
|
82
99
|
}
|
|
100
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. */
|
|
101
|
+
export type CredentialListCredentialsItemAdditionalOriginsList = Array<string>;
|
|
83
102
|
export interface CredentialListCredentialsItem {
|
|
103
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. */
|
|
104
|
+
additionalOrigins?: CredentialListCredentialsItemAdditionalOriginsList | undefined;
|
|
84
105
|
/** Date and time the credential was created */
|
|
85
106
|
createdAt: string;
|
|
86
107
|
/** Label for the credential */
|
|
@@ -96,11 +117,15 @@ export type CredentialListCredentialsList = Array<CredentialListCredentialsItem>
|
|
|
96
117
|
export interface CredentialList {
|
|
97
118
|
credentials: CredentialListCredentialsList;
|
|
98
119
|
}
|
|
120
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. Replaces the current list; [] clears it. */
|
|
121
|
+
export type UpdateCredentialRequestAdditionalOriginsList = Array<string>;
|
|
99
122
|
/** Value for the credential */
|
|
100
123
|
export type UpdateCredentialRequestValueMap = {
|
|
101
124
|
[key: string]: string | Redacted.Redacted<string> | undefined;
|
|
102
125
|
};
|
|
103
126
|
export interface UpdateCredentialRequest {
|
|
127
|
+
/** Canonical http(s) origins, besides `origin`, this credential may be filled on, such as its login host or identity provider (e.g. `https://login.example.com`). Only the credential's origin and these ever match a page, exactly; at most 20. Replaces the current list; [] clears it. */
|
|
128
|
+
additionalOrigins?: UpdateCredentialRequestAdditionalOriginsList | undefined;
|
|
104
129
|
/** Label for the credential */
|
|
105
130
|
label?: string | undefined;
|
|
106
131
|
/** The namespace the credential is stored against. Defaults to "default". */
|
|
@@ -112,6 +137,35 @@ export interface UpdateCredentialRequest {
|
|
|
112
137
|
/** Value for the credential */
|
|
113
138
|
value?: UpdateCredentialRequestValueMap | undefined;
|
|
114
139
|
}
|
|
140
|
+
export interface ErrorResponseContextItem {
|
|
141
|
+
keyword: string;
|
|
142
|
+
message: string;
|
|
143
|
+
params: unknown;
|
|
144
|
+
}
|
|
145
|
+
export type ErrorResponseContextList = Array<ErrorResponseContextItem>;
|
|
146
|
+
/** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
|
|
147
|
+
export type ErrorResponseDetailsMap = {
|
|
148
|
+
[key: string]: unknown | undefined;
|
|
149
|
+
};
|
|
150
|
+
/** An error response from the API */
|
|
151
|
+
export interface ErrorResponse {
|
|
152
|
+
/** Stable machine-readable reason, e.g. 'budget_exceeded' or 'profile_not_ready'. Branch on this instead of parsing the message. */
|
|
153
|
+
code?: string | undefined;
|
|
154
|
+
context?: ErrorResponseContextList | undefined;
|
|
155
|
+
/** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
|
|
156
|
+
details?: ErrorResponseDetailsMap | undefined;
|
|
157
|
+
error?: string | undefined;
|
|
158
|
+
linkToDocs?: string | undefined;
|
|
159
|
+
message: string;
|
|
160
|
+
/** The request field that caused the error, if any. */
|
|
161
|
+
param?: string | undefined;
|
|
162
|
+
/** Seconds to wait before retrying. Also sent as the Retry-After header. */
|
|
163
|
+
retryAfterSeconds?: number | undefined;
|
|
164
|
+
/** Whether the same request can succeed later without changes. False means fix the request or the account first. */
|
|
165
|
+
retryable?: boolean | undefined;
|
|
166
|
+
/** Where a person turns on the refused feature, e.g. verifying the account. Pass it to your user. */
|
|
167
|
+
unlockUrl?: string | undefined;
|
|
168
|
+
}
|
|
115
169
|
export type CreateCredentialError = BadRequest | Conflict | SteelOpError;
|
|
116
170
|
/** Stores credentials Encrypts and stores credentials for an origin */
|
|
117
171
|
export declare const createCredential: API.OperationMethod<CreateCredentialRequest, CredentialMetadata, CreateCredentialError, SteelOpContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sources":["../../src/services/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAGjD,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAEvD,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;;;;;;;;;;;AAc7C,qBAAa,UACX,SAAQ,aAAa,CAAC,eAUrB;IAED,SAAiB,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CAChD;;;;;;;;;;;AAED,qBAAa,QACX,SAAQ,aAAa,CAAC,aAUrB;IAED,SAAiB,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CAChD;;;;;;;;;;;AAED,qBAAa,QACX,SAAQ,aAAa,CAAC,aAUrB;IAED,SAAiB,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CAChD;AAED,oPAAoP;AACpP,MAAM,MAAM,4CAA4C,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACzE,+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;AACD,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AACzE,uEAAuE;AACvE,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,CAUb,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAC5D,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,eAAe,EACf,qBAAqB,EACrB,cAAc,CAUb,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AACxE,iGAAiG;AACjG,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,cAAc,EACd,oBAAoB,EACpB,cAAc,CAUb,CAAC;AAEJ,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,QAAQ,GAAG,YAAY,CAAC;AACzE,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,CAChD,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,CAUb,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ca as e,Gc as t,Hc as n,Jc as r,Kc as i,Mc as a,Oc as o,Pc as s,Rc as c,Wc as l,Xc as u,a as d,b as f,errors$SteelServiceErrors as p,f as m,l as h,m as g,n as _,protocol$SteelProtocol as v,retry$Retry as y,traits$Http as b,traits$Query as x,traits$SensitiveValue as S,traits$applyErrorMatchers as C,wc as w,xc as T,za as E}from"../_bundle/sdk.js";const D={system:`steel-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Steel`,service:`Credentials`,propagate:`w3c`};const O=/*@__PURE__*/ m(function BadRequest(e){return g(e,new.target,[`$10($9()("BadRequest",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:400}]);#4:3`,[c,E,t,r,__d0,u,o,l,n,a,C]])});const k=/*@__PURE__*/ m(function Conflict(i){return g(i,new.target,[`$10($9()("Conflict",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:409}]);#4:3`,[c,e,t,r,__d0,u,o,l,n,a,C]])});const A=/*@__PURE__*/ m(function NotFound(e){return g(e,new.target,[`$10($9()("NotFound",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:404}]);#4:3`,[c,E,t,r,__d0,u,o,l,n,a,C]])});const j=/*@__PURE__*/ _(e=>e===d?h(`CreateCredential`,`{input:#1,output:#2:1,errors:[$8,$9],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$7(>2)@"%Request";$6({additionalOrigins:$3(#2:0),label:$3($4),namespace:$3($4),origin:$3($4),projectId:$3($4),value:#5:0}).pipe($1({method:"POST",uri:"/v1/credentials",code:200}))`,[c,b,__d1,l,r,__d2,i,u,O,k,p,v,y,D]):f(j,e));const M=/*@__PURE__*/ _(e=>e===d?h(`DeleteCredential`,`{input:#1,output:#2,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$5(>3)@"%Request";$5(>4)@"SuccessResponse";$4({namespace:$3($2),origin:$2,projectId:$3($2)}).pipe($1({method:"DELETE",uri:"/v1/credentials",code:200}));$4({success:$6})`,[c,b,r,l,i,u,T,A,p,v,y,D]):f(M,e));const N=/*@__PURE__*/ _(e=>e===d?h(`ListCredentials`,`{input:#1,output:#3,errors:[$9,$10],serviceErrors:$11,protocol:$12,retry:$13,telemetry:$14,span:"%"};$6(>4)@"%Request";$8(#7:1);$6(>5)@"CredentialList";$5({projectId:$4($3.pipe($2())),namespace:$4($3.pipe($2())),origin:$4($3.pipe($2()))}).pipe($1({method:"GET",uri:"/v1/credentials",code:200}));$5({credentials:#2})`,[c,b,x,r,l,i,u,__d1,w,O,A,p,v,y,D]):f(N,e));const P=/*@__PURE__*/ _(e=>e===d?h(`UpdateCredential`,`{input:#1,output:#2:1,errors:[$8,$9],serviceErrors:$10,protocol:$11,retry:$12,telemetry:$13,span:"%"};$7(>2)@"%Request";$6({additionalOrigins:$3(#2:0),label:$3($4),namespace:$3($4),origin:$3($4),projectId:$3($4),value:$3(#5:0)}).pipe($1({method:"PUT",uri:"/v1/credentials",code:200}))`,[c,b,__d1,l,r,__d2,i,u,O,A,p,v,y,D]):f(P,e));function __d0(){return[`$4(>4)@"ErrorResponseContextItem";$5(#0);$6($1,$2);$4(>5)@"ErrorResponse";$3({keyword:$1,message:$1,params:$2});$3({code:$7($1),context:$7(#1),details:$7(#2),error:$7($1),linkToDocs:$7($1),message:$1,param:$7($1),retryAfterSeconds:$7($8),retryable:$7($9),unlockUrl:$7($1)})`,[c,r,s,i,u,w,n,l,t,T]]}function __d1(){return[`$2($1);$5(>2)@"CredentialMetadata";$4({additionalOrigins:$3(#0),createdAt:$1,label:$3($1),namespace:$3($1),origin:$3($1),updatedAt:$1})`,[c,r,w,l,i,u]]}function __d2(){return[`$3($1,$1.pipe($2({})))`,[c,r,S,n]]}export{O as BadRequest,k as Conflict,A as NotFound,j as createCredential,M as deleteCredential,N as listCredentials,P as updateCredential};
|
|
2
2
|
//# sourceMappingURL=credentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","names":["API.newError","__L.at","C.withBadRequestError","S.Number","S.String","S.TaggedError","T.applyErrorMatchers","C.withConflictError","API.D","API.named","T.Http","S.
|
|
1
|
+
{"version":3,"file":"credentials.js","names":["API.newError","__L.at","C.withBadRequestError","S.Number","S.String","S.suspend","S.Union","S.optional","S.Record","S.TaggedError","T.applyErrorMatchers","C.withConflictError","API.D","API.named","T.Http","S.Struct","Retry.Retry","API.call","S.Boolean","T.Query","S.Array","S.Unknown","T.SensitiveValue","withConflictError","Number","Record","String","Struct","TaggedError","Union","Unknown","at","optional","suspend","D","call","SteelServiceErrors","error","named","newError","op","SteelProtocol","Retry","Http","Query","SensitiveValue","applyErrorMatchers","Array","Boolean","withBadRequestError","TELEMETRY","BadRequest","i","Conflict","NotFound","createCredential","deleteCredential","listCredentials","updateCredential"],"sources":["../../src/services/credentials.ts"],"mappings":"kWAcA,MAAMkD,EAAY,CAChB,OAAQ,YACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,QACR,QAAS,cACT,UAAW,KACb,EAEA,MAAaC,EAAgC,gBAAU,SAAS,WAAW,EAAa,CACtF,OAAOnD,EAAaoD,EAAG,WAAY,CAAC,2HAA4H,CAACnD,EAAQC,EAAuBC,EAAUC,EAAU,KAAMC,EAAWC,EAASC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CAC3S,CAAC,EAED,MAAa2C,EAA8B,gBAAU,SAAS,SAAS,EAAa,CAClF,OAAOrD,EAAa,EAAG,WAAY,CAAC,yHAA0H,CAACC,EAAQU,EAAqBR,EAAUC,EAAU,KAAMC,EAAWC,EAASC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CACvS,CAAC,EAED,MAAa4C,EAA8B,gBAAU,SAAS,SAAS,EAAa,CAClF,OAAOtD,EAAaoD,EAAG,WAAY,CAAC,yHAA0H,CAACnD,EAAQC,EAAuBC,EAAUC,EAAU,KAAMC,EAAWC,EAASC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CACzS,CAAC,EA8HD,MAAa6C,EAKK,gBAAQ,GAAgBH,IAAMxC,EAAQC,EAAU,mBAAoB,4RAA6R,CAACZ,EAAQa,EAAQ,KAAMP,EAAYH,EAAU,KAAMW,EAAUV,EAAW8C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3
|
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
4
|
import { type SteelOpError, type SteelOpContext } from "../protocol.ts";
|
|
4
5
|
export type { SteelOpError, SteelOpContext };
|
|
5
6
|
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
6
7
|
readonly code: any;
|
|
7
8
|
readonly message: any;
|
|
9
|
+
readonly body: any;
|
|
10
|
+
readonly headers: any;
|
|
8
11
|
}> & (new (...args: any[]) => {
|
|
9
12
|
"@distilled.cloud/error/categories": {
|
|
10
13
|
BadRequestError: true;
|
|
11
14
|
};
|
|
12
15
|
});
|
|
13
16
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
17
|
+
readonly body?: ErrorResponse | string;
|
|
14
18
|
}
|
|
15
19
|
declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
|
|
16
20
|
readonly code: any;
|
|
17
21
|
readonly message: any;
|
|
22
|
+
readonly body: any;
|
|
23
|
+
readonly headers: any;
|
|
18
24
|
}> & (new (...args: any[]) => {
|
|
19
25
|
"@distilled.cloud/error/categories": {
|
|
20
26
|
ConflictError: true;
|
|
21
27
|
};
|
|
22
28
|
});
|
|
23
29
|
export declare class Conflict extends /*@__PURE__*/ Conflict_base {
|
|
30
|
+
readonly body?: ErrorResponse | string;
|
|
24
31
|
}
|
|
25
32
|
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
26
33
|
readonly code: any;
|
|
27
34
|
readonly message: any;
|
|
35
|
+
readonly body: any;
|
|
36
|
+
readonly headers: any;
|
|
28
37
|
}> & (new (...args: any[]) => {
|
|
29
38
|
"@distilled.cloud/error/categories": {
|
|
30
39
|
BadRequestError: true;
|
|
31
40
|
};
|
|
32
41
|
});
|
|
33
42
|
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
43
|
+
readonly body?: ErrorResponse | string;
|
|
34
44
|
}
|
|
35
45
|
declare const PayloadTooLarge_base: S.TaggedErrorClass<"PayloadTooLarge", {
|
|
36
46
|
readonly code: any;
|
|
37
47
|
readonly message: any;
|
|
48
|
+
readonly body: any;
|
|
49
|
+
readonly headers: any;
|
|
38
50
|
}> & (new (...args: any[]) => {
|
|
39
51
|
"@distilled.cloud/error/categories": {
|
|
40
52
|
BadRequestError: true;
|
|
41
53
|
};
|
|
42
54
|
});
|
|
43
55
|
export declare class PayloadTooLarge extends /*@__PURE__*/ PayloadTooLarge_base {
|
|
56
|
+
readonly body?: ErrorResponse | string;
|
|
44
57
|
}
|
|
45
58
|
export interface DeleteAllExtensionsRequest {
|
|
46
59
|
}
|
|
@@ -55,7 +68,11 @@ export interface DownloadExtensionRequest {
|
|
|
55
68
|
/** Extension ID */
|
|
56
69
|
extensionId: string;
|
|
57
70
|
}
|
|
58
|
-
export
|
|
71
|
+
export interface DownloadExtensionResponse {
|
|
72
|
+
body: BinaryStream;
|
|
73
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
74
|
+
contentType?: string | undefined;
|
|
75
|
+
}
|
|
59
76
|
export interface ListExtensionsRequest {
|
|
60
77
|
}
|
|
61
78
|
export interface ExtensionListExtensionsItem {
|
|
@@ -101,6 +118,35 @@ export interface UploadExtensionRequest {
|
|
|
101
118
|
/** Extension URL */
|
|
102
119
|
url?: string | undefined;
|
|
103
120
|
}
|
|
121
|
+
export interface ErrorResponseContextItem {
|
|
122
|
+
keyword: string;
|
|
123
|
+
message: string;
|
|
124
|
+
params: unknown;
|
|
125
|
+
}
|
|
126
|
+
export type ErrorResponseContextList = Array<ErrorResponseContextItem>;
|
|
127
|
+
/** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
|
|
128
|
+
export type ErrorResponseDetailsMap = {
|
|
129
|
+
[key: string]: unknown | undefined;
|
|
130
|
+
};
|
|
131
|
+
/** An error response from the API */
|
|
132
|
+
export interface ErrorResponse {
|
|
133
|
+
/** Stable machine-readable reason, e.g. 'budget_exceeded' or 'profile_not_ready'. Branch on this instead of parsing the message. */
|
|
134
|
+
code?: string | undefined;
|
|
135
|
+
context?: ErrorResponseContextList | undefined;
|
|
136
|
+
/** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
|
|
137
|
+
details?: ErrorResponseDetailsMap | undefined;
|
|
138
|
+
error?: string | undefined;
|
|
139
|
+
linkToDocs?: string | undefined;
|
|
140
|
+
message: string;
|
|
141
|
+
/** The request field that caused the error, if any. */
|
|
142
|
+
param?: string | undefined;
|
|
143
|
+
/** Seconds to wait before retrying. Also sent as the Retry-After header. */
|
|
144
|
+
retryAfterSeconds?: number | undefined;
|
|
145
|
+
/** Whether the same request can succeed later without changes. False means fix the request or the account first. */
|
|
146
|
+
retryable?: boolean | undefined;
|
|
147
|
+
/** Where a person turns on the refused feature, e.g. verifying the account. Pass it to your user. */
|
|
148
|
+
unlockUrl?: string | undefined;
|
|
149
|
+
}
|
|
104
150
|
export type DeleteAllExtensionsError = BadRequest | SteelOpError;
|
|
105
151
|
/** Delete all extensions Delete all extensions for the organization */
|
|
106
152
|
export declare const deleteAllExtensions: API.OperationMethod<DeleteAllExtensionsRequest, DeleteResponse, DeleteAllExtensionsError, SteelOpContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.ts","
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sources":["../../src/services/extensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAAK,CAAC,MAAM,mCAAmC,CAAC;AAGvD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMvF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;;;;;;;;;;;AAe7C,qBAAa,UACX,SAAQ,aAAa,CAAC,eAUrB;IAED,SAAiB,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAAC;CACh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,cAAc,CAUb,CAAC;AAEJ,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,QAAQ,GAAG,eAAe,GAAG,YAAY,CAAC;AAC1F,+GAA+G;AAC/G,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,eAAe,CAC/C,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,cAAc,CAUb,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ca as e,Gc as t,Hc as n,Jc as r,Kb as i,Kc as a,Mc as o,Oc as s,Pc as c,Rc as l,Uc as u,Wc as d,Xc as f,a as p,b as m,errors$SteelServiceErrors as h,f as g,l as _,m as v,n as y,protocol$SteelProtocol as b,retry$Retry as x,traits$BinaryResponse as S,traits$Header as C,traits$Http as w,traits$Label as T,traits$RawResponse as E,traits$applyErrorMatchers as D,wc as O,xc as k,za as A}from"../_bundle/sdk.js";const j={system:`steel-api`,responseHeaders:[{header:`x-request-id`,name:`http.response.header.x-request-id`,transform:`list`},{header:`request-id`,name:`http.response.header.request-id`,transform:`list`}],prefix:`Steel`,service:`Extensions`,labels:`steel`,propagate:`w3c`};const M=/*@__PURE__*/ g(function BadRequest(e){return v(e,new.target,[`$10($9()("BadRequest",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:400}]);#4:3`,[l,A,t,r,__d0,f,s,d,n,o,D]])});const N=/*@__PURE__*/ g(function Conflict(i){return v(i,new.target,[`$10($9()("Conflict",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:409}]);#4:3`,[l,e,t,r,__d0,f,s,d,n,o,D]])});const P=/*@__PURE__*/ g(function NotFound(e){return v(e,new.target,[`$10($9()("NotFound",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:404}]);#4:3`,[l,A,t,r,__d0,f,s,d,n,o,D]])});const F=/*@__PURE__*/ g(function PayloadTooLarge(e){return v(e,new.target,[`$10($9()("PayloadTooLarge",{code:$2,message:$3,body:$7($6([$5(>1),$3])),headers:$7($8($3,$3))}).pipe($1),[{status:413}]);#4:3`,[l,A,t,r,__d0,f,s,d,n,o,D]])});const I=/*@__PURE__*/ y(e=>e===p?_(`DeleteAllExtensions`,`{input:#1,output:#4:0,errors:[$5],serviceErrors:$6,protocol:$7,retry:$8,telemetry:$9,span:"%"};$3(>2)@"%Request";$2({}).pipe($1({method:"DELETE",uri:"/v1/extensions",code:200}))`,[l,w,a,f,__d1,M,h,b,x,j]):m(I,e));const L=/*@__PURE__*/ y(e=>e===p?_(`DeleteExtension`,`{input:#1,output:#6:0,errors:[$7,$8],serviceErrors:$9,protocol:$10,retry:$11,telemetry:$12,span:"%"};$5(>2)@"%Request";$4({extensionId:$3.pipe($2())}).pipe($1({method:"DELETE",uri:"/v1/extensions/{extensionId}",code:200}))`,[l,w,T,r,a,f,__d1,M,P,h,b,x,j]):m(L,e));const R=/*@__PURE__*/ y(e=>e===p?_(`DownloadExtension`,`{input:#1,output:#2,errors:[$11,$12],serviceErrors:$13,protocol:$14,retry:$15,telemetry:$16,span:"%"};$5(>3)@"%Request";$5(>4)@"%Response";$4({extensionId:$3.pipe($2())}).pipe($1({method:"GET",uri:"/v1/extensions/{extensionId}",code:200}));$4({body:$8.pipe($6(),$7()),contentType:$10($3.pipe($9("Content-Type")))})`,[l,w,T,r,a,f,E,S,i,C,d,M,P,h,b,x,j]):m(R,e));const z=/*@__PURE__*/ y(e=>e===p?_(`ListExtensions`,`{input:#1,output:#3,errors:[$7],serviceErrors:$8,protocol:$9,retry:$10,telemetry:$11,span:"%"};$3(>4)@"%Request";$5(#4:0);$3(>5)@"ExtensionList";$2({}).pipe($1({method:"GET",uri:"/v1/extensions",code:200}));$2({count:$6,extensions:#2})`,[l,w,a,f,__d2,O,t,M,h,b,x,j]):m(z,e));const B=/*@__PURE__*/ y(e=>e===p?_(`UpdateExtension`,`{input:#1,output:#12:0,errors:[$13,$14,$15,$16],serviceErrors:$17,protocol:$18,retry:$19,telemetry:$20,span:"%"};$11(>2)@"%Request";$10({extensionId:$3.pipe($2()),file:$9($8([$5($4),$5($6),$5($7)])),url:$9($3)}).pipe($1({method:"PUT",uri:"/v1/extensions/{extensionId}",code:200,contentType:"multipart"}))`,[l,w,T,r,Blob,u,Uint8Array,ArrayBuffer,s,d,a,f,__d2,M,P,N,F,h,b,x,j]):m(B,e));const V=/*@__PURE__*/ y(e=>e===p?_(`UploadExtension`,`{input:#1,output:#11:0,errors:[$12,$13,$14],serviceErrors:$15,protocol:$16,retry:$17,telemetry:$18,span:"%"};$10(>2)@"%Request";$9({file:$7($6([$3($2),$3($4),$3($5)])),url:$7($8)}).pipe($1({method:"POST",uri:"/v1/extensions",code:200,contentType:"multipart"}))`,[l,w,Blob,u,Uint8Array,ArrayBuffer,s,d,r,a,f,__d2,M,N,F,h,b,x,j]):m(V,e));function __d0(){return[`$4(>4)@"ErrorResponseContextItem";$5(#0);$6($1,$2);$4(>5)@"ErrorResponse";$3({keyword:$1,message:$1,params:$2});$3({code:$7($1),context:$7(#1),details:$7(#2),error:$7($1),linkToDocs:$7($1),message:$1,param:$7($1),retryAfterSeconds:$7($8),retryable:$7($9),unlockUrl:$7($1)})`,[l,r,c,a,f,O,n,d,t,k]]}function __d1(){return[`$3(>1)@"DeleteResponse";$2({message:$1})`,[l,r,a,f]]}function __d2(){return[`$3(>1)@"ExtensionListExtensionsItem";$2({createdAt:$1,id:$1,name:$1,updatedAt:$1})`,[l,r,a,f]]}export{M as BadRequest,N as Conflict,P as NotFound,F as PayloadTooLarge,I as deleteAllExtensions,L as deleteExtension,R as downloadExtension,z as listExtensions,B as updateExtension,V as uploadExtension};
|
|
2
2
|
//# sourceMappingURL=extensions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.js","names":["API.newError","__L.at","C.withBadRequestError","S.Number","S.String","S.TaggedError","T.applyErrorMatchers","C.withConflictError","API.D","API.named","T.Http","S.Struct","
|
|
1
|
+
{"version":3,"file":"extensions.js","names":["API.newError","__L.at","C.withBadRequestError","S.Number","S.String","S.suspend","S.Union","S.optional","S.Record","S.TaggedError","T.applyErrorMatchers","C.withConflictError","API.D","API.named","T.Http","S.Struct","Retry.Retry","API.call","T.Label","T.RawResponse","T.BinaryResponse","T.Header","S.Array","S.instanceOf","S.Unknown","S.Boolean","withConflictError","Number","Record","String","BinaryStream","Struct","TaggedError","Union","Unknown","at","instanceOf","optional","suspend","D","call","SteelServiceErrors","error","named","newError","op","SteelProtocol","Retry","BinaryResponse","Header","Http","Label","RawResponse","applyErrorMatchers","Array","Boolean","withBadRequestError","TELEMETRY","BadRequest","i","Conflict","NotFound","PayloadTooLarge","deleteAllExtensions","deleteExtension","downloadExtension","listExtensions","updateExtension","uploadExtension"],"sources":["../../src/services/extensions.ts"],"mappings":"6ZAcA,MAAMyD,EAAY,CAChB,OAAQ,YACR,gBAAiB,CACf,CAAE,OAAQ,eAAgB,KAAM,oCAAqC,UAAW,MAAO,EACvF,CAAE,OAAQ,aAAc,KAAM,kCAAmC,UAAW,MAAO,CACrF,EACA,OAAQ,QACR,QAAS,aACT,OAAQ,QACR,UAAW,KACb,EAEA,MAAaC,EAAgC,gBAAU,SAAS,WAAW,EAAa,CACtF,OAAO1D,EAAa2D,EAAG,WAAY,CAAC,2HAA4H,CAAC1D,EAAQC,EAAuBC,EAAUC,EAAU,KAAMC,EAAWC,EAASC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CAC3S,CAAC,EAED,MAAakD,EAA8B,gBAAU,SAAS,SAAS,EAAa,CAClF,OAAO5D,EAAa,EAAG,WAAY,CAAC,yHAA0H,CAACC,EAAQU,EAAqBR,EAAUC,EAAU,KAAMC,EAAWC,EAASC,EAAYC,EAAUC,EAAeC,CAAoB,CAAC,CAAC,CACvS,CAAC,EAED,MAAamD,EAA8B,gBAAU,SAAS,SAAS,EAAa,CAClF,OAAO7D,EAAa2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,CAAC,EASve,MAAaQ,EAKK,gBAAQ,GAAgBR,IAAM/C,EAAQC,EAAU,kBAAmB,mTAAoT,CAACZ,EAAQa,EAAQI,EAASd,EAAU,KAAMmB,EAAc,WAAY,YAAajB,EAASC,EAAYQ,EAAUV,EAAW,KAAMqD,EAAYG,EAAUD,EAAUE,EAAiBrB,EAAoBK,EAAe9B,EAAayC,CAAS,CAAC,EAAIxC,EAASkD,EAAiBR,CAAC,CAAC,EAIrpB,MAAaS,EAKK,gBAAQ,GAAgBT,IAAM/C,EAAQC,EAAU,kBAAmB,uQAAwQ,CAACZ,EAAQa,EAAQ,KAAMS,EAAc,WAAY,YAAajB,EAASC,EAAYH,EAAUW,EAAUV,EAAW,KAAMqD,EAAYE,EAAUE,EAAiBrB,EAAoBK,EAAe9B,EAAayC,CAAS,CAAC,EAAIxC,EAASmD,EAAiBT,CAAC,CAAC,EAMtlB,SAAS,MAAY,CACnB,MAAO,CAAC,oRAAqR,CAAC1D,EAAQG,EAAUoB,EAAWT,EAAUV,EAAWiB,EAASd,EAAUD,EAAYJ,EAAUsB,CAAS,CAAC,CACrY,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,2CAA4C,CAACxB,EAAQG,EAAUW,EAAUV,CAAS,CAAC,CAC7F,CACA,SAAS,MAAY,CACnB,MAAO,CAAC,qFAAsF,CAACJ,EAAQG,EAAUW,EAAUV,CAAS,CAAC,CACvI"}
|
package/lib/services/files.d.ts
CHANGED
|
@@ -1,46 +1,59 @@
|
|
|
1
1
|
import * as API from "@distilled.cloud/core/api";
|
|
2
|
+
import { BinaryStream } from "@distilled.cloud/core/protocol-rest";
|
|
2
3
|
import * as S from "@distilled.cloud/core/schema-lite";
|
|
3
4
|
import { type SteelOpError, type SteelOpContext } from "../protocol.ts";
|
|
4
5
|
export type { SteelOpError, SteelOpContext };
|
|
5
6
|
declare const BadRequest_base: S.TaggedErrorClass<"BadRequest", {
|
|
6
7
|
readonly code: any;
|
|
7
8
|
readonly message: any;
|
|
9
|
+
readonly body: any;
|
|
10
|
+
readonly headers: any;
|
|
8
11
|
}> & (new (...args: any[]) => {
|
|
9
12
|
"@distilled.cloud/error/categories": {
|
|
10
13
|
BadRequestError: true;
|
|
11
14
|
};
|
|
12
15
|
});
|
|
13
16
|
export declare class BadRequest extends /*@__PURE__*/ BadRequest_base {
|
|
17
|
+
readonly body?: ErrorResponse | string;
|
|
14
18
|
}
|
|
15
19
|
declare const Conflict_base: S.TaggedErrorClass<"Conflict", {
|
|
16
20
|
readonly code: any;
|
|
17
21
|
readonly message: any;
|
|
22
|
+
readonly body: any;
|
|
23
|
+
readonly headers: any;
|
|
18
24
|
}> & (new (...args: any[]) => {
|
|
19
25
|
"@distilled.cloud/error/categories": {
|
|
20
26
|
ConflictError: true;
|
|
21
27
|
};
|
|
22
28
|
});
|
|
23
29
|
export declare class Conflict extends /*@__PURE__*/ Conflict_base {
|
|
30
|
+
readonly body?: ErrorResponse | string;
|
|
24
31
|
}
|
|
25
32
|
declare const NotFound_base: S.TaggedErrorClass<"NotFound", {
|
|
26
33
|
readonly code: any;
|
|
27
34
|
readonly message: any;
|
|
35
|
+
readonly body: any;
|
|
36
|
+
readonly headers: any;
|
|
28
37
|
}> & (new (...args: any[]) => {
|
|
29
38
|
"@distilled.cloud/error/categories": {
|
|
30
39
|
BadRequestError: true;
|
|
31
40
|
};
|
|
32
41
|
});
|
|
33
42
|
export declare class NotFound extends /*@__PURE__*/ NotFound_base {
|
|
43
|
+
readonly body?: ErrorResponse | string;
|
|
34
44
|
}
|
|
35
45
|
declare const UnsupportedMediaType_base: S.TaggedErrorClass<"UnsupportedMediaType", {
|
|
36
46
|
readonly code: any;
|
|
37
47
|
readonly message: any;
|
|
48
|
+
readonly body: any;
|
|
49
|
+
readonly headers: any;
|
|
38
50
|
}> & (new (...args: any[]) => {
|
|
39
51
|
"@distilled.cloud/error/categories": {
|
|
40
52
|
BadRequestError: true;
|
|
41
53
|
};
|
|
42
54
|
});
|
|
43
55
|
export declare class UnsupportedMediaType extends /*@__PURE__*/ UnsupportedMediaType_base {
|
|
56
|
+
readonly body?: ErrorResponse | string;
|
|
44
57
|
}
|
|
45
58
|
export interface DeleteAllFilesRequest {
|
|
46
59
|
sessionId: string;
|
|
@@ -61,16 +74,28 @@ export interface DeleteGlobalFileResponse {
|
|
|
61
74
|
export interface DownloadArchiveRequest {
|
|
62
75
|
sessionId: string;
|
|
63
76
|
}
|
|
64
|
-
export
|
|
77
|
+
export interface DownloadArchiveResponse {
|
|
78
|
+
body: BinaryStream;
|
|
79
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
80
|
+
contentType?: string | undefined;
|
|
81
|
+
}
|
|
65
82
|
export interface DownloadFileRequest {
|
|
66
83
|
sessionId: string;
|
|
67
84
|
path: string;
|
|
68
85
|
}
|
|
69
|
-
export
|
|
86
|
+
export interface DownloadFileResponse {
|
|
87
|
+
body: BinaryStream;
|
|
88
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
89
|
+
contentType?: string | undefined;
|
|
90
|
+
}
|
|
70
91
|
export interface DownloadGlobalFileRequest {
|
|
71
92
|
path: string;
|
|
72
93
|
}
|
|
73
|
-
export
|
|
94
|
+
export interface DownloadGlobalFileResponse {
|
|
95
|
+
body: BinaryStream;
|
|
96
|
+
/** Media type of the body, from the response's `Content-Type` header (e.g. `image/jpeg`). */
|
|
97
|
+
contentType?: string | undefined;
|
|
98
|
+
}
|
|
74
99
|
export interface ListFilesRequest {
|
|
75
100
|
sessionId: string;
|
|
76
101
|
}
|
|
@@ -111,6 +136,35 @@ export interface UploadGlobalFileRequest {
|
|
|
111
136
|
/** Path to the file in the storage system */
|
|
112
137
|
path?: string | undefined;
|
|
113
138
|
}
|
|
139
|
+
export interface ErrorResponseContextItem {
|
|
140
|
+
keyword: string;
|
|
141
|
+
message: string;
|
|
142
|
+
params: unknown;
|
|
143
|
+
}
|
|
144
|
+
export type ErrorResponseContextList = Array<ErrorResponseContextItem>;
|
|
145
|
+
/** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
|
|
146
|
+
export type ErrorResponseDetailsMap = {
|
|
147
|
+
[key: string]: unknown | undefined;
|
|
148
|
+
};
|
|
149
|
+
/** An error response from the API */
|
|
150
|
+
export interface ErrorResponse {
|
|
151
|
+
/** Stable machine-readable reason, e.g. 'budget_exceeded' or 'profile_not_ready'. Branch on this instead of parsing the message. */
|
|
152
|
+
code?: string | undefined;
|
|
153
|
+
context?: ErrorResponseContextList | undefined;
|
|
154
|
+
/** Structured data about the error for the caller, e.g. `candidates` for credential_ambiguous. Never contains secret values. */
|
|
155
|
+
details?: ErrorResponseDetailsMap | undefined;
|
|
156
|
+
error?: string | undefined;
|
|
157
|
+
linkToDocs?: string | undefined;
|
|
158
|
+
message: string;
|
|
159
|
+
/** The request field that caused the error, if any. */
|
|
160
|
+
param?: string | undefined;
|
|
161
|
+
/** Seconds to wait before retrying. Also sent as the Retry-After header. */
|
|
162
|
+
retryAfterSeconds?: number | undefined;
|
|
163
|
+
/** Whether the same request can succeed later without changes. False means fix the request or the account first. */
|
|
164
|
+
retryable?: boolean | undefined;
|
|
165
|
+
/** Where a person turns on the refused feature, e.g. verifying the account. Pass it to your user. */
|
|
166
|
+
unlockUrl?: string | undefined;
|
|
167
|
+
}
|
|
114
168
|
export type DeleteAllFilesError = NotFound | Conflict | SteelOpError;
|
|
115
169
|
/** Delete all files Delete all files from a session */
|
|
116
170
|
export declare const deleteAllFiles: API.OperationMethod<DeleteAllFilesRequest, DeleteAllFilesResponse, DeleteAllFilesError, SteelOpContext>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","
|
|
1
|
+
{"version":3,"file":"files.d.ts","sources":["../../src/services/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,2BAA2B,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,KAA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