@0xsequence/builder 0.0.0-20250430130723 → 0.0.0-20250520201059
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/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +161 -0
- package/LICENSE +0 -17
- package/README.md +1 -2
- package/dist/{declarations/src/builder.gen.d.ts → builder.gen.d.ts} +1 -0
- package/dist/builder.gen.d.ts.map +1 -0
- package/dist/builder.gen.js +419 -0
- package/dist/{declarations/src/index.d.ts → index.d.ts} +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +41 -0
- package/package.json +20 -11
- package/src/builder.gen.ts +72 -72
- package/src/index.ts +1 -1
- package/tsconfig.json +10 -0
- package/dist/0xsequence-builder.cjs.d.ts +0 -2
- package/dist/0xsequence-builder.cjs.dev.js +0 -487
- package/dist/0xsequence-builder.cjs.js +0 -7
- package/dist/0xsequence-builder.cjs.prod.js +0 -487
- package/dist/0xsequence-builder.esm.js +0 -449
package/CHANGELOG.md
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
# @0xsequence/builder
|
2
|
+
|
3
|
+
## 0.0.0-20250520201059
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Alpha snapshot
|
8
|
+
|
9
|
+
## 2.3.8
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- indexer: update clients
|
14
|
+
|
15
|
+
## 2.3.7
|
16
|
+
|
17
|
+
### Patch Changes
|
18
|
+
|
19
|
+
- Metadata updates
|
20
|
+
|
21
|
+
## 2.3.6
|
22
|
+
|
23
|
+
### Patch Changes
|
24
|
+
|
25
|
+
- New chains
|
26
|
+
|
27
|
+
## 2.3.5
|
28
|
+
|
29
|
+
### Patch Changes
|
30
|
+
|
31
|
+
- Add Frequency Testnet
|
32
|
+
|
33
|
+
## 2.3.4
|
34
|
+
|
35
|
+
### Patch Changes
|
36
|
+
|
37
|
+
- metadata: exclude deprecated methods on rpc client
|
38
|
+
|
39
|
+
## 2.3.3
|
40
|
+
|
41
|
+
### Patch Changes
|
42
|
+
|
43
|
+
- metadata: client update
|
44
|
+
|
45
|
+
## 2.3.2
|
46
|
+
|
47
|
+
### Patch Changes
|
48
|
+
|
49
|
+
- metadata: update rpc client
|
50
|
+
|
51
|
+
## 2.3.1
|
52
|
+
|
53
|
+
### Patch Changes
|
54
|
+
|
55
|
+
- indexer: update rpc client
|
56
|
+
|
57
|
+
## 2.3.0
|
58
|
+
|
59
|
+
### Minor Changes
|
60
|
+
|
61
|
+
- update metadata rpc client
|
62
|
+
|
63
|
+
## 2.2.15
|
64
|
+
|
65
|
+
### Patch Changes
|
66
|
+
|
67
|
+
- API updates
|
68
|
+
|
69
|
+
## 2.2.14
|
70
|
+
|
71
|
+
### Patch Changes
|
72
|
+
|
73
|
+
- Somnia Testnet and Monad Testnet
|
74
|
+
|
75
|
+
## 2.2.13
|
76
|
+
|
77
|
+
### Patch Changes
|
78
|
+
|
79
|
+
- Add XR1 to all networks
|
80
|
+
|
81
|
+
## 2.2.12
|
82
|
+
|
83
|
+
### Patch Changes
|
84
|
+
|
85
|
+
- Add XR1
|
86
|
+
|
87
|
+
## 2.2.11
|
88
|
+
|
89
|
+
### Patch Changes
|
90
|
+
|
91
|
+
- Relayer updates
|
92
|
+
|
93
|
+
## 2.2.10
|
94
|
+
|
95
|
+
### Patch Changes
|
96
|
+
|
97
|
+
- Etherlink support
|
98
|
+
|
99
|
+
## 2.2.9
|
100
|
+
|
101
|
+
### Patch Changes
|
102
|
+
|
103
|
+
- Indexer gateway native token balances
|
104
|
+
|
105
|
+
## 2.2.8
|
106
|
+
|
107
|
+
### Patch Changes
|
108
|
+
|
109
|
+
- Add Moonbeam and Moonbase Alpha
|
110
|
+
|
111
|
+
## 2.2.7
|
112
|
+
|
113
|
+
### Patch Changes
|
114
|
+
|
115
|
+
- Update Builder package
|
116
|
+
|
117
|
+
## 2.2.6
|
118
|
+
|
119
|
+
### Patch Changes
|
120
|
+
|
121
|
+
- Update relayer package
|
122
|
+
|
123
|
+
## 2.2.5
|
124
|
+
|
125
|
+
### Patch Changes
|
126
|
+
|
127
|
+
- auth: fix sequence indexer gateway url
|
128
|
+
- account: immutable wallet proxy hook
|
129
|
+
|
130
|
+
## 2.2.4
|
131
|
+
|
132
|
+
### Patch Changes
|
133
|
+
|
134
|
+
- network: update soneium mainnet block explorer url
|
135
|
+
- waas: signTypedData intent support
|
136
|
+
|
137
|
+
## 2.2.3
|
138
|
+
|
139
|
+
### Patch Changes
|
140
|
+
|
141
|
+
- provider: updating initWallet to use connected network configs if they exist
|
142
|
+
|
143
|
+
## 2.2.2
|
144
|
+
|
145
|
+
### Patch Changes
|
146
|
+
|
147
|
+
- pass projectAccessKey to relayer at all times
|
148
|
+
|
149
|
+
## 2.2.1
|
150
|
+
|
151
|
+
### Patch Changes
|
152
|
+
|
153
|
+
- waas-ethers: sign typed data
|
154
|
+
|
155
|
+
## 2.2.0
|
156
|
+
|
157
|
+
### Minor Changes
|
158
|
+
|
159
|
+
- indexer: gateway client
|
160
|
+
- @0xsequence/builder
|
161
|
+
- upgrade puppeteer to v23.10.3
|
package/LICENSE
CHANGED
@@ -1,20 +1,3 @@
|
|
1
|
-
Copyright (c) 2017-present Horizon Blockchain Games Inc.
|
2
|
-
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
you may not use this file except in compliance with the License.
|
5
|
-
You may obtain a copy of the License at
|
6
|
-
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
See the License for the specific language governing permissions and
|
13
|
-
limitations under the License.
|
14
|
-
|
15
|
-
|
16
|
-
------------------------------------------------------------------------
|
17
|
-
|
18
1
|
|
19
2
|
Apache License
|
20
3
|
Version 2.0, January 2004
|
package/README.md
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"builder.gen.d.ts","sourceRoot":"","sources":["../src/builder.gen.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,WAAW,CAAA;AAEpC,eAAO,MAAM,iBAAiB,kEAAkE,CAAA;AAGhG,eAAO,MAAM,aAAa,OAAO,CAAA;AAGjC,eAAO,MAAM,mBAAmB,WAAW,CAAA;AAG3C,eAAO,MAAM,gBAAgB,6CAA6C,CAAA;AAE1E,KAAK,iBAAiB,GAAG;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAarE;AA+BD,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE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c,OAAO;IACrB,cAAc,OAAO;IACrB,eAAe,OAAO;IACtB,eAAe,OAAO;IACtB,OAAO,OAAO;IACd,eAAe,OAAO;IACtB,QAAQ,OAAO;IACf,YAAY,OAAO;IACnB,eAAe,OAAO;CACvB;AAED,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAA;CAuBpD,CAAA;AAED,MAAM,MAAM,KAAK,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA"}
|
@@ -0,0 +1,419 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.webrpcErrorByCode = exports.WebrpcErrorCodes = exports.errors = exports.AlreadyCollaboratorError = exports.ProjectNotFoundError = exports.UserNotFoundError = exports.NotFoundError = exports.InvalidArgumentError = exports.TimeoutError = exports.ServiceDisabledError = exports.RequestConflictError = exports.MethodNotFoundError = exports.SessionExpiredError = exports.PermissionDeniedError = exports.UnauthorizedError = exports.WebrpcStreamFinishedError = exports.WebrpcStreamLostError = exports.WebrpcClientDisconnectedError = exports.WebrpcInternalErrorError = exports.WebrpcServerPanicError = exports.WebrpcBadResponseError = exports.WebrpcBadRequestError = exports.WebrpcBadMethodError = exports.WebrpcBadRouteError = exports.WebrpcRequestFailedError = exports.WebrpcEndpointError = exports.WebrpcError = exports.Builder = exports.WebRPCSchemaHash = exports.WebRPCSchemaVersion = exports.WebRPCVersion = exports.WebrpcHeaderValue = exports.WebrpcHeader = void 0;
|
4
|
+
exports.VersionFromHeader = VersionFromHeader;
|
5
|
+
/* eslint-disable */
|
6
|
+
// NOTE: this is just a subset of the builder api to scope down the
|
7
|
+
// surface area of the client.
|
8
|
+
//
|
9
|
+
// In the future we can include additional interfaces as needed.
|
10
|
+
exports.WebrpcHeader = 'Webrpc';
|
11
|
+
exports.WebrpcHeaderValue = 'webrpc@v0.22.1;gen-typescript@v0.16.2;sequence-builder@v0.1.0';
|
12
|
+
// WebRPC description and code-gen version
|
13
|
+
exports.WebRPCVersion = 'v1';
|
14
|
+
// Schema version of your RIDL schema
|
15
|
+
exports.WebRPCSchemaVersion = 'v0.1.0';
|
16
|
+
// Schema hash generated from your RIDL schema
|
17
|
+
exports.WebRPCSchemaHash = '461bc324d241f4df14fbf63268fde2cfe4873e3e';
|
18
|
+
function VersionFromHeader(headers) {
|
19
|
+
const headerValue = headers.get(exports.WebrpcHeader);
|
20
|
+
if (!headerValue) {
|
21
|
+
return {
|
22
|
+
webrpcGenVersion: '',
|
23
|
+
codeGenName: '',
|
24
|
+
codeGenVersion: '',
|
25
|
+
schemaName: '',
|
26
|
+
schemaVersion: '',
|
27
|
+
};
|
28
|
+
}
|
29
|
+
return parseWebrpcGenVersions(headerValue);
|
30
|
+
}
|
31
|
+
function parseWebrpcGenVersions(header) {
|
32
|
+
const versions = header.split(';');
|
33
|
+
if (versions.length < 3) {
|
34
|
+
return {
|
35
|
+
webrpcGenVersion: '',
|
36
|
+
codeGenName: '',
|
37
|
+
codeGenVersion: '',
|
38
|
+
schemaName: '',
|
39
|
+
schemaVersion: '',
|
40
|
+
};
|
41
|
+
}
|
42
|
+
const [_, webrpcGenVersion] = versions[0].split('@');
|
43
|
+
const [codeGenName, codeGenVersion] = versions[1].split('@');
|
44
|
+
const [schemaName, schemaVersion] = versions[2].split('@');
|
45
|
+
return {
|
46
|
+
webrpcGenVersion: webrpcGenVersion,
|
47
|
+
codeGenName: codeGenName,
|
48
|
+
codeGenVersion: codeGenVersion,
|
49
|
+
schemaName: schemaName,
|
50
|
+
schemaVersion: schemaVersion,
|
51
|
+
};
|
52
|
+
}
|
53
|
+
//
|
54
|
+
// Client
|
55
|
+
//
|
56
|
+
class Builder {
|
57
|
+
hostname;
|
58
|
+
fetch;
|
59
|
+
path = '/rpc/Builder/';
|
60
|
+
constructor(hostname, fetch) {
|
61
|
+
this.hostname = hostname.replace(/\/*$/, '');
|
62
|
+
this.fetch = (input, init) => fetch(input, init);
|
63
|
+
}
|
64
|
+
url(name) {
|
65
|
+
return this.hostname + this.path + name;
|
66
|
+
}
|
67
|
+
ping = (headers, signal) => {
|
68
|
+
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers, signal)).then((res) => {
|
69
|
+
return buildResponse(res).then((_data) => {
|
70
|
+
return {
|
71
|
+
status: _data.status,
|
72
|
+
};
|
73
|
+
});
|
74
|
+
}, (error) => {
|
75
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` });
|
76
|
+
});
|
77
|
+
};
|
78
|
+
registerAudienceContact = (args, headers, signal) => {
|
79
|
+
return this.fetch(this.url('RegisterAudienceContact'), createHTTPRequest(args, headers, signal)).then((res) => {
|
80
|
+
return buildResponse(res).then((_data) => {
|
81
|
+
return {
|
82
|
+
ok: _data.ok,
|
83
|
+
};
|
84
|
+
});
|
85
|
+
}, (error) => {
|
86
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` });
|
87
|
+
});
|
88
|
+
};
|
89
|
+
getRegisteredAudienceContact = (args, headers, signal) => {
|
90
|
+
return this.fetch(this.url('GetRegisteredAudienceContact'), createHTTPRequest(args, headers, signal)).then((res) => {
|
91
|
+
return buildResponse(res).then((_data) => {
|
92
|
+
return {
|
93
|
+
contact: _data.contact,
|
94
|
+
};
|
95
|
+
});
|
96
|
+
}, (error) => {
|
97
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` });
|
98
|
+
});
|
99
|
+
};
|
100
|
+
getAudienceRegistrationPublicStatus = (args, headers, signal) => {
|
101
|
+
return this.fetch(this.url('GetAudienceRegistrationPublicStatus'), createHTTPRequest(args, headers, signal)).then((res) => {
|
102
|
+
return buildResponse(res).then((_data) => {
|
103
|
+
return {
|
104
|
+
status: _data.status,
|
105
|
+
};
|
106
|
+
});
|
107
|
+
}, (error) => {
|
108
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` });
|
109
|
+
});
|
110
|
+
};
|
111
|
+
isAudienceContactRegistered = (args, headers, signal) => {
|
112
|
+
return this.fetch(this.url('IsAudienceContactRegistered'), createHTTPRequest(args, headers, signal)).then((res) => {
|
113
|
+
return buildResponse(res).then((_data) => {
|
114
|
+
return {
|
115
|
+
registered: _data.registered,
|
116
|
+
};
|
117
|
+
});
|
118
|
+
}, (error) => {
|
119
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` });
|
120
|
+
});
|
121
|
+
};
|
122
|
+
}
|
123
|
+
exports.Builder = Builder;
|
124
|
+
const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
|
125
|
+
const reqHeaders = { ...headers, 'Content-Type': 'application/json' };
|
126
|
+
reqHeaders[exports.WebrpcHeader] = exports.WebrpcHeaderValue;
|
127
|
+
return {
|
128
|
+
method: 'POST',
|
129
|
+
headers: reqHeaders,
|
130
|
+
body: JSON.stringify(body || {}),
|
131
|
+
signal,
|
132
|
+
};
|
133
|
+
};
|
134
|
+
const buildResponse = (res) => {
|
135
|
+
return res.text().then((text) => {
|
136
|
+
let data;
|
137
|
+
try {
|
138
|
+
data = JSON.parse(text);
|
139
|
+
}
|
140
|
+
catch (error) {
|
141
|
+
let message = '';
|
142
|
+
if (error instanceof Error) {
|
143
|
+
message = error.message;
|
144
|
+
}
|
145
|
+
throw WebrpcBadResponseError.new({
|
146
|
+
status: res.status,
|
147
|
+
cause: `JSON.parse(): ${message}: response text: ${text}`,
|
148
|
+
});
|
149
|
+
}
|
150
|
+
if (!res.ok) {
|
151
|
+
const code = typeof data.code === 'number' ? data.code : 0;
|
152
|
+
throw (exports.webrpcErrorByCode[code] || WebrpcError).new(data);
|
153
|
+
}
|
154
|
+
return data;
|
155
|
+
});
|
156
|
+
};
|
157
|
+
//
|
158
|
+
// Errors
|
159
|
+
//
|
160
|
+
class WebrpcError extends Error {
|
161
|
+
name;
|
162
|
+
code;
|
163
|
+
message;
|
164
|
+
status;
|
165
|
+
cause;
|
166
|
+
/** @deprecated Use message instead of msg. Deprecated in webrpc v0.11.0. */
|
167
|
+
msg;
|
168
|
+
constructor(name, code, message, status, cause) {
|
169
|
+
super(message);
|
170
|
+
this.name = name || 'WebrpcError';
|
171
|
+
this.code = typeof code === 'number' ? code : 0;
|
172
|
+
this.message = message || `endpoint error ${this.code}`;
|
173
|
+
this.msg = this.message;
|
174
|
+
this.status = typeof status === 'number' ? status : 0;
|
175
|
+
this.cause = cause;
|
176
|
+
Object.setPrototypeOf(this, WebrpcError.prototype);
|
177
|
+
}
|
178
|
+
static new(payload) {
|
179
|
+
return new this(payload.error, payload.code, payload.message || payload.msg, payload.status, payload.cause);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
exports.WebrpcError = WebrpcError;
|
183
|
+
// Webrpc errors
|
184
|
+
class WebrpcEndpointError extends WebrpcError {
|
185
|
+
constructor(name = 'WebrpcEndpoint', code = 0, message = 'endpoint error', status = 0, cause) {
|
186
|
+
super(name, code, message, status, cause);
|
187
|
+
Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
|
188
|
+
}
|
189
|
+
}
|
190
|
+
exports.WebrpcEndpointError = WebrpcEndpointError;
|
191
|
+
class WebrpcRequestFailedError extends WebrpcError {
|
192
|
+
constructor(name = 'WebrpcRequestFailed', code = -1, message = 'request failed', status = 0, cause) {
|
193
|
+
super(name, code, message, status, cause);
|
194
|
+
Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
|
195
|
+
}
|
196
|
+
}
|
197
|
+
exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
|
198
|
+
class WebrpcBadRouteError extends WebrpcError {
|
199
|
+
constructor(name = 'WebrpcBadRoute', code = -2, message = 'bad route', status = 0, cause) {
|
200
|
+
super(name, code, message, status, cause);
|
201
|
+
Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
|
202
|
+
}
|
203
|
+
}
|
204
|
+
exports.WebrpcBadRouteError = WebrpcBadRouteError;
|
205
|
+
class WebrpcBadMethodError extends WebrpcError {
|
206
|
+
constructor(name = 'WebrpcBadMethod', code = -3, message = 'bad method', status = 0, cause) {
|
207
|
+
super(name, code, message, status, cause);
|
208
|
+
Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
|
209
|
+
}
|
210
|
+
}
|
211
|
+
exports.WebrpcBadMethodError = WebrpcBadMethodError;
|
212
|
+
class WebrpcBadRequestError extends WebrpcError {
|
213
|
+
constructor(name = 'WebrpcBadRequest', code = -4, message = 'bad request', status = 0, cause) {
|
214
|
+
super(name, code, message, status, cause);
|
215
|
+
Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
|
216
|
+
}
|
217
|
+
}
|
218
|
+
exports.WebrpcBadRequestError = WebrpcBadRequestError;
|
219
|
+
class WebrpcBadResponseError extends WebrpcError {
|
220
|
+
constructor(name = 'WebrpcBadResponse', code = -5, message = 'bad response', status = 0, cause) {
|
221
|
+
super(name, code, message, status, cause);
|
222
|
+
Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
|
223
|
+
}
|
224
|
+
}
|
225
|
+
exports.WebrpcBadResponseError = WebrpcBadResponseError;
|
226
|
+
class WebrpcServerPanicError extends WebrpcError {
|
227
|
+
constructor(name = 'WebrpcServerPanic', code = -6, message = 'server panic', status = 0, cause) {
|
228
|
+
super(name, code, message, status, cause);
|
229
|
+
Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
|
230
|
+
}
|
231
|
+
}
|
232
|
+
exports.WebrpcServerPanicError = WebrpcServerPanicError;
|
233
|
+
class WebrpcInternalErrorError extends WebrpcError {
|
234
|
+
constructor(name = 'WebrpcInternalError', code = -7, message = 'internal error', status = 0, cause) {
|
235
|
+
super(name, code, message, status, cause);
|
236
|
+
Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
|
237
|
+
}
|
238
|
+
}
|
239
|
+
exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
|
240
|
+
class WebrpcClientDisconnectedError extends WebrpcError {
|
241
|
+
constructor(name = 'WebrpcClientDisconnected', code = -8, message = 'client disconnected', status = 0, cause) {
|
242
|
+
super(name, code, message, status, cause);
|
243
|
+
Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError;
|
247
|
+
class WebrpcStreamLostError extends WebrpcError {
|
248
|
+
constructor(name = 'WebrpcStreamLost', code = -9, message = 'stream lost', status = 0, cause) {
|
249
|
+
super(name, code, message, status, cause);
|
250
|
+
Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
|
251
|
+
}
|
252
|
+
}
|
253
|
+
exports.WebrpcStreamLostError = WebrpcStreamLostError;
|
254
|
+
class WebrpcStreamFinishedError extends WebrpcError {
|
255
|
+
constructor(name = 'WebrpcStreamFinished', code = -10, message = 'stream finished', status = 0, cause) {
|
256
|
+
super(name, code, message, status, cause);
|
257
|
+
Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
|
258
|
+
}
|
259
|
+
}
|
260
|
+
exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
|
261
|
+
// Schema errors
|
262
|
+
class UnauthorizedError extends WebrpcError {
|
263
|
+
constructor(name = 'Unauthorized', code = 1000, message = 'Unauthorized access', status = 0, cause) {
|
264
|
+
super(name, code, message, status, cause);
|
265
|
+
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
266
|
+
}
|
267
|
+
}
|
268
|
+
exports.UnauthorizedError = UnauthorizedError;
|
269
|
+
class PermissionDeniedError extends WebrpcError {
|
270
|
+
constructor(name = 'PermissionDenied', code = 1001, message = 'Permission denied', status = 0, cause) {
|
271
|
+
super(name, code, message, status, cause);
|
272
|
+
Object.setPrototypeOf(this, PermissionDeniedError.prototype);
|
273
|
+
}
|
274
|
+
}
|
275
|
+
exports.PermissionDeniedError = PermissionDeniedError;
|
276
|
+
class SessionExpiredError extends WebrpcError {
|
277
|
+
constructor(name = 'SessionExpired', code = 1002, message = 'Session expired', status = 0, cause) {
|
278
|
+
super(name, code, message, status, cause);
|
279
|
+
Object.setPrototypeOf(this, SessionExpiredError.prototype);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
exports.SessionExpiredError = SessionExpiredError;
|
283
|
+
class MethodNotFoundError extends WebrpcError {
|
284
|
+
constructor(name = 'MethodNotFound', code = 1003, message = 'Method not found', status = 0, cause) {
|
285
|
+
super(name, code, message, status, cause);
|
286
|
+
Object.setPrototypeOf(this, MethodNotFoundError.prototype);
|
287
|
+
}
|
288
|
+
}
|
289
|
+
exports.MethodNotFoundError = MethodNotFoundError;
|
290
|
+
class RequestConflictError extends WebrpcError {
|
291
|
+
constructor(name = 'RequestConflict', code = 1004, message = 'Conflict with target resource', status = 0, cause) {
|
292
|
+
super(name, code, message, status, cause);
|
293
|
+
Object.setPrototypeOf(this, RequestConflictError.prototype);
|
294
|
+
}
|
295
|
+
}
|
296
|
+
exports.RequestConflictError = RequestConflictError;
|
297
|
+
class ServiceDisabledError extends WebrpcError {
|
298
|
+
constructor(name = 'ServiceDisabled', code = 1005, message = 'Service disabled', status = 0, cause) {
|
299
|
+
super(name, code, message, status, cause);
|
300
|
+
Object.setPrototypeOf(this, ServiceDisabledError.prototype);
|
301
|
+
}
|
302
|
+
}
|
303
|
+
exports.ServiceDisabledError = ServiceDisabledError;
|
304
|
+
class TimeoutError extends WebrpcError {
|
305
|
+
constructor(name = 'Timeout', code = 2000, message = 'Request timed out', status = 0, cause) {
|
306
|
+
super(name, code, message, status, cause);
|
307
|
+
Object.setPrototypeOf(this, TimeoutError.prototype);
|
308
|
+
}
|
309
|
+
}
|
310
|
+
exports.TimeoutError = TimeoutError;
|
311
|
+
class InvalidArgumentError extends WebrpcError {
|
312
|
+
constructor(name = 'InvalidArgument', code = 2001, message = 'Invalid argument', status = 0, cause) {
|
313
|
+
super(name, code, message, status, cause);
|
314
|
+
Object.setPrototypeOf(this, InvalidArgumentError.prototype);
|
315
|
+
}
|
316
|
+
}
|
317
|
+
exports.InvalidArgumentError = InvalidArgumentError;
|
318
|
+
class NotFoundError extends WebrpcError {
|
319
|
+
constructor(name = 'NotFound', code = 3000, message = 'Resource not found', status = 0, cause) {
|
320
|
+
super(name, code, message, status, cause);
|
321
|
+
Object.setPrototypeOf(this, NotFoundError.prototype);
|
322
|
+
}
|
323
|
+
}
|
324
|
+
exports.NotFoundError = NotFoundError;
|
325
|
+
class UserNotFoundError extends WebrpcError {
|
326
|
+
constructor(name = 'UserNotFound', code = 3001, message = 'User not found', status = 0, cause) {
|
327
|
+
super(name, code, message, status, cause);
|
328
|
+
Object.setPrototypeOf(this, UserNotFoundError.prototype);
|
329
|
+
}
|
330
|
+
}
|
331
|
+
exports.UserNotFoundError = UserNotFoundError;
|
332
|
+
class ProjectNotFoundError extends WebrpcError {
|
333
|
+
constructor(name = 'ProjectNotFound', code = 3002, message = 'Project not found', status = 0, cause) {
|
334
|
+
super(name, code, message, status, cause);
|
335
|
+
Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
|
336
|
+
}
|
337
|
+
}
|
338
|
+
exports.ProjectNotFoundError = ProjectNotFoundError;
|
339
|
+
class AlreadyCollaboratorError extends WebrpcError {
|
340
|
+
constructor(name = 'AlreadyCollaborator', code = 4001, message = 'Already a collaborator', status = 0, cause) {
|
341
|
+
super(name, code, message, status, cause);
|
342
|
+
Object.setPrototypeOf(this, AlreadyCollaboratorError.prototype);
|
343
|
+
}
|
344
|
+
}
|
345
|
+
exports.AlreadyCollaboratorError = AlreadyCollaboratorError;
|
346
|
+
var errors;
|
347
|
+
(function (errors) {
|
348
|
+
errors["WebrpcEndpoint"] = "WebrpcEndpoint";
|
349
|
+
errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
|
350
|
+
errors["WebrpcBadRoute"] = "WebrpcBadRoute";
|
351
|
+
errors["WebrpcBadMethod"] = "WebrpcBadMethod";
|
352
|
+
errors["WebrpcBadRequest"] = "WebrpcBadRequest";
|
353
|
+
errors["WebrpcBadResponse"] = "WebrpcBadResponse";
|
354
|
+
errors["WebrpcServerPanic"] = "WebrpcServerPanic";
|
355
|
+
errors["WebrpcInternalError"] = "WebrpcInternalError";
|
356
|
+
errors["WebrpcClientDisconnected"] = "WebrpcClientDisconnected";
|
357
|
+
errors["WebrpcStreamLost"] = "WebrpcStreamLost";
|
358
|
+
errors["WebrpcStreamFinished"] = "WebrpcStreamFinished";
|
359
|
+
errors["Unauthorized"] = "Unauthorized";
|
360
|
+
errors["PermissionDenied"] = "PermissionDenied";
|
361
|
+
errors["SessionExpired"] = "SessionExpired";
|
362
|
+
errors["MethodNotFound"] = "MethodNotFound";
|
363
|
+
errors["RequestConflict"] = "RequestConflict";
|
364
|
+
errors["ServiceDisabled"] = "ServiceDisabled";
|
365
|
+
errors["Timeout"] = "Timeout";
|
366
|
+
errors["InvalidArgument"] = "InvalidArgument";
|
367
|
+
errors["NotFound"] = "NotFound";
|
368
|
+
errors["UserNotFound"] = "UserNotFound";
|
369
|
+
errors["ProjectNotFound"] = "ProjectNotFound";
|
370
|
+
})(errors || (exports.errors = errors = {}));
|
371
|
+
var WebrpcErrorCodes;
|
372
|
+
(function (WebrpcErrorCodes) {
|
373
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
|
374
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
|
375
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRoute"] = -2] = "WebrpcBadRoute";
|
376
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadMethod"] = -3] = "WebrpcBadMethod";
|
377
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRequest"] = -4] = "WebrpcBadRequest";
|
378
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadResponse"] = -5] = "WebrpcBadResponse";
|
379
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcServerPanic"] = -6] = "WebrpcServerPanic";
|
380
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcInternalError"] = -7] = "WebrpcInternalError";
|
381
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcClientDisconnected"] = -8] = "WebrpcClientDisconnected";
|
382
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamLost"] = -9] = "WebrpcStreamLost";
|
383
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamFinished"] = -10] = "WebrpcStreamFinished";
|
384
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Unauthorized"] = 1000] = "Unauthorized";
|
385
|
+
WebrpcErrorCodes[WebrpcErrorCodes["PermissionDenied"] = 1001] = "PermissionDenied";
|
386
|
+
WebrpcErrorCodes[WebrpcErrorCodes["SessionExpired"] = 1002] = "SessionExpired";
|
387
|
+
WebrpcErrorCodes[WebrpcErrorCodes["MethodNotFound"] = 1003] = "MethodNotFound";
|
388
|
+
WebrpcErrorCodes[WebrpcErrorCodes["RequestConflict"] = 1004] = "RequestConflict";
|
389
|
+
WebrpcErrorCodes[WebrpcErrorCodes["ServiceDisabled"] = 1005] = "ServiceDisabled";
|
390
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
391
|
+
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
392
|
+
WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 3000] = "NotFound";
|
393
|
+
WebrpcErrorCodes[WebrpcErrorCodes["UserNotFound"] = 3001] = "UserNotFound";
|
394
|
+
WebrpcErrorCodes[WebrpcErrorCodes["ProjectNotFound"] = 3002] = "ProjectNotFound";
|
395
|
+
})(WebrpcErrorCodes || (exports.WebrpcErrorCodes = WebrpcErrorCodes = {}));
|
396
|
+
exports.webrpcErrorByCode = {
|
397
|
+
[0]: WebrpcEndpointError,
|
398
|
+
[-1]: WebrpcRequestFailedError,
|
399
|
+
[-2]: WebrpcBadRouteError,
|
400
|
+
[-3]: WebrpcBadMethodError,
|
401
|
+
[-4]: WebrpcBadRequestError,
|
402
|
+
[-5]: WebrpcBadResponseError,
|
403
|
+
[-6]: WebrpcServerPanicError,
|
404
|
+
[-7]: WebrpcInternalErrorError,
|
405
|
+
[-8]: WebrpcClientDisconnectedError,
|
406
|
+
[-9]: WebrpcStreamLostError,
|
407
|
+
[-10]: WebrpcStreamFinishedError,
|
408
|
+
[1000]: UnauthorizedError,
|
409
|
+
[1001]: PermissionDeniedError,
|
410
|
+
[1002]: SessionExpiredError,
|
411
|
+
[1003]: MethodNotFoundError,
|
412
|
+
[1004]: RequestConflictError,
|
413
|
+
[1005]: ServiceDisabledError,
|
414
|
+
[2000]: TimeoutError,
|
415
|
+
[2001]: InvalidArgumentError,
|
416
|
+
[3000]: NotFoundError,
|
417
|
+
[3001]: UserNotFoundError,
|
418
|
+
[3002]: ProjectNotFoundError,
|
419
|
+
};
|
@@ -1,7 +1,8 @@
|
|
1
|
-
export * from
|
2
|
-
import { Builder as BuilderRpc } from
|
1
|
+
export * from './builder.gen';
|
2
|
+
import { Builder as BuilderRpc } from './builder.gen';
|
3
3
|
export declare class SequenceBuilderClient extends BuilderRpc {
|
4
4
|
projectAccessKey: string;
|
5
5
|
constructor(projectAccessKey: string, apiUrl?: string);
|
6
6
|
_fetch: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
7
7
|
}
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAA;AAErD,qBAAa,qBAAsB,SAAQ,UAAU;IAE1C,gBAAgB,EAAE,MAAM;gBAAxB,gBAAgB,EAAE,MAAM,EAC/B,MAAM,CAAC,EAAE,MAAM;IAOjB,MAAM,GAAI,OAAO,WAAW,EAAE,OAAO,WAAW,KAAG,OAAO,CAAC,QAAQ,CAAC,CAcnE;CACF"}
|