@girs/rest-1.0 1.0.0-3.2.6 → 1.0.0-3.2.8
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 +1 -1
- package/package.json +15 -9
- package/rest-1.0-ambient.js +2 -0
- package/rest-1.0-import.js +3 -0
- package/rest-1.0.d.cts +57 -85
- package/rest-1.0.d.ts +57 -85
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
GJS TypeScript type definitions for Rest-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.
|
|
8
|
+
GJS TypeScript type definitions for Rest-1.0, generated from library version 1.0.0 using [ts-for-gir](https://github.com/gjsify/ts-for-gir) v3.2.8.
|
|
9
9
|
|
|
10
10
|
A helper library for RESTful services.
|
|
11
11
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@girs/rest-1.0",
|
|
3
|
-
"version": "1.0.0-3.2.
|
|
3
|
+
"version": "1.0.0-3.2.8",
|
|
4
4
|
"description": "GJS TypeScript type definitions for Rest-1.0, generated from library version 1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "rest-1.0.js",
|
|
7
7
|
"main": "rest-1.0.js",
|
|
8
8
|
"exports": {
|
|
9
|
-
"./ambient":
|
|
10
|
-
|
|
9
|
+
"./ambient": {
|
|
10
|
+
"types": "./rest-1.0-ambient.d.ts",
|
|
11
|
+
"default": "./rest-1.0-ambient.js"
|
|
12
|
+
},
|
|
13
|
+
"./import": {
|
|
14
|
+
"types": "./rest-1.0-import.d.ts",
|
|
15
|
+
"default": "./rest-1.0-import.js"
|
|
16
|
+
},
|
|
11
17
|
".": {
|
|
12
18
|
"import": {
|
|
13
19
|
"types": "./rest-1.0.d.ts",
|
|
@@ -25,11 +31,11 @@
|
|
|
25
31
|
"test:cjs": "NODE_OPTIONS=--max_old_space_size=9216 tsc --noEmit rest-1.0.d.cts"
|
|
26
32
|
},
|
|
27
33
|
"dependencies": {
|
|
28
|
-
"@girs/gio-2.0": "^2.
|
|
29
|
-
"@girs/gjs": "^3.2.
|
|
30
|
-
"@girs/glib-2.0": "^2.
|
|
31
|
-
"@girs/gobject-2.0": "^2.
|
|
32
|
-
"@girs/soup-3.0": "^3.4.
|
|
34
|
+
"@girs/gio-2.0": "^2.77.0-3.2.8",
|
|
35
|
+
"@girs/gjs": "^3.2.8",
|
|
36
|
+
"@girs/glib-2.0": "^2.77.0-3.2.8",
|
|
37
|
+
"@girs/gobject-2.0": "^2.77.0-3.2.8",
|
|
38
|
+
"@girs/soup-3.0": "^3.4.2-3.2.8"
|
|
33
39
|
},
|
|
34
40
|
"devDependencies": {
|
|
35
41
|
"typescript": "*"
|
|
@@ -46,7 +52,7 @@
|
|
|
46
52
|
"license": "MIT",
|
|
47
53
|
"repository": {
|
|
48
54
|
"type": "git",
|
|
49
|
-
"url": "git+https://github.com/gjsify/
|
|
55
|
+
"url": "git+https://github.com/gjsify/ts-for-gir.git"
|
|
50
56
|
},
|
|
51
57
|
"bugs": {
|
|
52
58
|
"url": "https://github.com/gjsify/ts-for-gir/issues"
|
package/rest-1.0.d.cts
CHANGED
|
@@ -224,7 +224,7 @@ export interface ProxyCallAsyncCallback {
|
|
|
224
224
|
(call: ProxyCall, error: GLib.Error, weak_object: GObject.Object, userdata: any | null): void
|
|
225
225
|
}
|
|
226
226
|
export interface ProxyCallContinuousCallback {
|
|
227
|
-
(call: ProxyCall, buf: string
|
|
227
|
+
(call: ProxyCall, buf: string, len: number, error: GLib.Error, weak_object: GObject.Object, userdata: any | null): void
|
|
228
228
|
}
|
|
229
229
|
export interface ProxyCallUploadCallback {
|
|
230
230
|
(call: ProxyCall, total: number, uploaded: number, error: GLib.Error, weak_object: GObject.Object, userdata: any | null): void
|
|
@@ -237,14 +237,6 @@ export module OAuth2Proxy {
|
|
|
237
237
|
|
|
238
238
|
// Own constructor properties of Rest-1.0.Rest.OAuth2Proxy
|
|
239
239
|
|
|
240
|
-
access_token?: string | null
|
|
241
|
-
auth_url?: string | null
|
|
242
|
-
client_id?: string | null
|
|
243
|
-
client_secret?: string | null
|
|
244
|
-
expiration_date?: GLib.DateTime | null
|
|
245
|
-
redirect_uri?: string | null
|
|
246
|
-
refresh_token?: string | null
|
|
247
|
-
token_url?: string | null
|
|
248
240
|
accessToken?: string | null
|
|
249
241
|
authUrl?: string | null
|
|
250
242
|
clientId?: string | null
|
|
@@ -261,21 +253,13 @@ export interface OAuth2Proxy {
|
|
|
261
253
|
|
|
262
254
|
// Own properties of Rest-1.0.Rest.OAuth2Proxy
|
|
263
255
|
|
|
264
|
-
access_token: string | null
|
|
265
256
|
accessToken: string | null
|
|
266
|
-
auth_url: string | null
|
|
267
257
|
authUrl: string | null
|
|
268
|
-
client_id: string | null
|
|
269
258
|
clientId: string | null
|
|
270
|
-
client_secret: string | null
|
|
271
259
|
clientSecret: string | null
|
|
272
|
-
expiration_date: GLib.DateTime
|
|
273
260
|
expirationDate: GLib.DateTime
|
|
274
|
-
redirect_uri: string | null
|
|
275
261
|
redirectUri: string | null
|
|
276
|
-
refresh_token: string | null
|
|
277
262
|
refreshToken: string | null
|
|
278
|
-
token_url: string | null
|
|
279
263
|
tokenUrl: string | null
|
|
280
264
|
|
|
281
265
|
// Own fields of Rest-1.0.Rest.OAuth2Proxy
|
|
@@ -284,8 +268,8 @@ export interface OAuth2Proxy {
|
|
|
284
268
|
|
|
285
269
|
// Owm methods of Rest-1.0.Rest.OAuth2Proxy
|
|
286
270
|
|
|
287
|
-
build_authorization_url(code_challenge: string
|
|
288
|
-
fetch_access_token_async(authorization_code: string
|
|
271
|
+
build_authorization_url(code_challenge: string, scope: string | null): [ /* returnType */ string | null, /* state */ string | null ]
|
|
272
|
+
fetch_access_token_async(authorization_code: string, code_verifier: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
289
273
|
|
|
290
274
|
// Overloads of fetch_access_token_async
|
|
291
275
|
|
|
@@ -298,16 +282,16 @@ export interface OAuth2Proxy {
|
|
|
298
282
|
* @param cancellable
|
|
299
283
|
* @returns A Promise of the result of {@link fetch_access_token_async}
|
|
300
284
|
*/
|
|
301
|
-
fetch_access_token_async(authorization_code: string
|
|
285
|
+
fetch_access_token_async(authorization_code: string, code_verifier: string, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
|
|
302
286
|
fetch_access_token_finish(result: Gio.AsyncResult): boolean
|
|
303
|
-
get_access_token(): string
|
|
304
|
-
get_auth_url(): string
|
|
305
|
-
get_client_id(): string
|
|
306
|
-
get_client_secret(): string
|
|
287
|
+
get_access_token(): string
|
|
288
|
+
get_auth_url(): string
|
|
289
|
+
get_client_id(): string
|
|
290
|
+
get_client_secret(): string
|
|
307
291
|
get_expiration_date(): GLib.DateTime
|
|
308
|
-
get_redirect_uri(): string
|
|
309
|
-
get_refresh_token(): string
|
|
310
|
-
get_token_url(): string
|
|
292
|
+
get_redirect_uri(): string
|
|
293
|
+
get_refresh_token(): string
|
|
294
|
+
get_token_url(): string
|
|
311
295
|
refresh_access_token(): boolean
|
|
312
296
|
refresh_access_token_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
313
297
|
|
|
@@ -322,14 +306,14 @@ export interface OAuth2Proxy {
|
|
|
322
306
|
*/
|
|
323
307
|
refresh_access_token_async(cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
|
|
324
308
|
refresh_access_token_finish(result: Gio.AsyncResult): boolean
|
|
325
|
-
set_access_token(access_token: string
|
|
326
|
-
set_auth_url(tokenurl: string
|
|
327
|
-
set_client_id(client_id: string
|
|
328
|
-
set_client_secret(client_secret: string
|
|
309
|
+
set_access_token(access_token: string): void
|
|
310
|
+
set_auth_url(tokenurl: string): void
|
|
311
|
+
set_client_id(client_id: string): void
|
|
312
|
+
set_client_secret(client_secret: string): void
|
|
329
313
|
set_expiration_date(expiration_date: GLib.DateTime): void
|
|
330
|
-
set_redirect_uri(redirect_uri: string
|
|
331
|
-
set_refresh_token(refresh_token: string
|
|
332
|
-
set_token_url(tokenurl: string
|
|
314
|
+
set_redirect_uri(redirect_uri: string): void
|
|
315
|
+
set_refresh_token(refresh_token: string): void
|
|
316
|
+
set_token_url(tokenurl: string): void
|
|
333
317
|
|
|
334
318
|
// Own virtual methods of Rest-1.0.Rest.OAuth2Proxy
|
|
335
319
|
|
|
@@ -412,7 +396,7 @@ export class OAuth2Proxy extends Proxy {
|
|
|
412
396
|
* @param baseurl
|
|
413
397
|
* @returns a newly created #RestOAuth2Proxy
|
|
414
398
|
*/
|
|
415
|
-
constructor(authurl: string
|
|
399
|
+
constructor(authurl: string, tokenurl: string, redirecturl: string, client_id: string, client_secret: string, baseurl: string)
|
|
416
400
|
/**
|
|
417
401
|
* Create a new #RestOAuth2Proxy.
|
|
418
402
|
* @constructor
|
|
@@ -424,7 +408,7 @@ export class OAuth2Proxy extends Proxy {
|
|
|
424
408
|
* @param baseurl
|
|
425
409
|
* @returns a newly created #RestOAuth2Proxy
|
|
426
410
|
*/
|
|
427
|
-
static new(authurl: string
|
|
411
|
+
static new(authurl: string, tokenurl: string, redirecturl: string, client_id: string, client_secret: string, baseurl: string): OAuth2Proxy
|
|
428
412
|
|
|
429
413
|
// Overloads of new
|
|
430
414
|
|
|
@@ -440,7 +424,7 @@ export class OAuth2Proxy extends Proxy {
|
|
|
440
424
|
* @param binding_required whether the URL needs to be bound before calling
|
|
441
425
|
* @returns A new #RestProxy.
|
|
442
426
|
*/
|
|
443
|
-
static new(url_format: string
|
|
427
|
+
static new(url_format: string, binding_required: boolean): Proxy
|
|
444
428
|
_init(config?: OAuth2Proxy.ConstructorProperties): void
|
|
445
429
|
}
|
|
446
430
|
|
|
@@ -491,20 +475,14 @@ export module Proxy {
|
|
|
491
475
|
|
|
492
476
|
// Own constructor properties of Rest-1.0.Rest.Proxy
|
|
493
477
|
|
|
494
|
-
binding_required?: boolean | null
|
|
495
|
-
disable_cookies?: boolean | null
|
|
496
|
-
password?: string | null
|
|
497
|
-
ssl_ca_file?: string | null
|
|
498
|
-
ssl_strict?: boolean | null
|
|
499
|
-
url_format?: string | null
|
|
500
|
-
user_agent?: string | null
|
|
501
|
-
username?: string | null
|
|
502
478
|
bindingRequired?: boolean | null
|
|
503
479
|
disableCookies?: boolean | null
|
|
480
|
+
password?: string | null
|
|
504
481
|
sslCaFile?: string | null
|
|
505
482
|
sslStrict?: boolean | null
|
|
506
483
|
urlFormat?: string | null
|
|
507
484
|
userAgent?: string | null
|
|
485
|
+
username?: string | null
|
|
508
486
|
}
|
|
509
487
|
|
|
510
488
|
}
|
|
@@ -513,18 +491,12 @@ export interface Proxy {
|
|
|
513
491
|
|
|
514
492
|
// Own properties of Rest-1.0.Rest.Proxy
|
|
515
493
|
|
|
516
|
-
binding_required: boolean
|
|
517
494
|
bindingRequired: boolean
|
|
518
|
-
readonly disable_cookies: boolean
|
|
519
495
|
readonly disableCookies: boolean
|
|
520
496
|
password: string | null
|
|
521
|
-
ssl_ca_file: string | null
|
|
522
497
|
sslCaFile: string | null
|
|
523
|
-
ssl_strict: boolean
|
|
524
498
|
sslStrict: boolean
|
|
525
|
-
url_format: string | null
|
|
526
499
|
urlFormat: string | null
|
|
527
|
-
user_agent: string | null
|
|
528
500
|
userAgent: string | null
|
|
529
501
|
username: string | null
|
|
530
502
|
|
|
@@ -552,14 +524,14 @@ export interface Proxy {
|
|
|
552
524
|
* @param feature A #SoupSessionFeature
|
|
553
525
|
*/
|
|
554
526
|
add_soup_feature(feature: Soup.SessionFeature): void
|
|
555
|
-
get_user_agent(): string
|
|
527
|
+
get_user_agent(): string
|
|
556
528
|
/**
|
|
557
529
|
* Create a new #RestProxyCall for making a call to the web service. This call
|
|
558
530
|
* is one-shot and should not be re-used for making multiple calls.
|
|
559
531
|
* @returns a new #RestProxyCall.
|
|
560
532
|
*/
|
|
561
533
|
new_call(): ProxyCall
|
|
562
|
-
set_user_agent(user_agent: string
|
|
534
|
+
set_user_agent(user_agent: string): void
|
|
563
535
|
|
|
564
536
|
// Own virtual methods of Rest-1.0.Rest.Proxy
|
|
565
537
|
|
|
@@ -630,7 +602,7 @@ export class Proxy extends GObject.Object {
|
|
|
630
602
|
* @param binding_required whether the URL needs to be bound before calling
|
|
631
603
|
* @returns A new #RestProxy.
|
|
632
604
|
*/
|
|
633
|
-
constructor(url_format: string
|
|
605
|
+
constructor(url_format: string, binding_required: boolean)
|
|
634
606
|
/**
|
|
635
607
|
* Create a new #RestProxy for the specified endpoint `url_format,` using the
|
|
636
608
|
* "GET" method.
|
|
@@ -643,7 +615,7 @@ export class Proxy extends GObject.Object {
|
|
|
643
615
|
* @param binding_required whether the URL needs to be bound before calling
|
|
644
616
|
* @returns A new #RestProxy.
|
|
645
617
|
*/
|
|
646
|
-
static new(url_format: string
|
|
618
|
+
static new(url_format: string, binding_required: boolean): Proxy
|
|
647
619
|
/**
|
|
648
620
|
* Create a new #RestProxy for the specified endpoint `url_format,` using the
|
|
649
621
|
* "GET" method.
|
|
@@ -658,7 +630,7 @@ export class Proxy extends GObject.Object {
|
|
|
658
630
|
* @param password the password provided by the user or client
|
|
659
631
|
* @returns A new #RestProxy.
|
|
660
632
|
*/
|
|
661
|
-
static new_with_authentication(url_format: string
|
|
633
|
+
static new_with_authentication(url_format: string, binding_required: boolean, username: string, password: string): Proxy
|
|
662
634
|
_init(config?: Proxy.ConstructorProperties): void
|
|
663
635
|
}
|
|
664
636
|
|
|
@@ -755,7 +727,7 @@ export interface ProxyCall {
|
|
|
755
727
|
* @param header The name of the header to set
|
|
756
728
|
* @param value The value of the header
|
|
757
729
|
*/
|
|
758
|
-
add_header(header: string
|
|
730
|
+
add_header(header: string, value: string): void
|
|
759
731
|
/**
|
|
760
732
|
* Add a query parameter called `param` with the string value `value` to the call.
|
|
761
733
|
* If a parameter with this name already exists, the new value will replace the
|
|
@@ -763,7 +735,7 @@ export interface ProxyCall {
|
|
|
763
735
|
* @param name The name of the parameter to set
|
|
764
736
|
* @param value The value of the parameter
|
|
765
737
|
*/
|
|
766
|
-
add_param(name: string
|
|
738
|
+
add_param(name: string, value: string): void
|
|
767
739
|
/**
|
|
768
740
|
* Add a query parameter `param` to the call.
|
|
769
741
|
* If a parameter with this name already exists, the new value will replace the
|
|
@@ -775,12 +747,12 @@ export interface ProxyCall {
|
|
|
775
747
|
* Get the REST function that is going to be called on the proxy.
|
|
776
748
|
* @returns The REST "function" for the current call, see also rest_proxy_call_set_function(). This string is owned by the #RestProxyCall and should not be freed.
|
|
777
749
|
*/
|
|
778
|
-
get_function(): string
|
|
750
|
+
get_function(): string
|
|
779
751
|
/**
|
|
780
752
|
* Get the HTTP method to use when making the call, for example GET or POST.
|
|
781
753
|
* @returns the HTTP method
|
|
782
754
|
*/
|
|
783
|
-
get_method(): string
|
|
755
|
+
get_method(): string
|
|
784
756
|
/**
|
|
785
757
|
* Get the parameters as a #RestParams of parameter names to values. The
|
|
786
758
|
* returned value is owned by the RestProxyCall instance and should not
|
|
@@ -792,7 +764,7 @@ export interface ProxyCall {
|
|
|
792
764
|
* Get the return payload.
|
|
793
765
|
* @returns A pointer to the payload. This is owned by #RestProxyCall and should not be freed.
|
|
794
766
|
*/
|
|
795
|
-
get_payload(): string
|
|
767
|
+
get_payload(): string
|
|
796
768
|
/**
|
|
797
769
|
* Get the length of the return payload.
|
|
798
770
|
* @returns the length of the payload in bytes.
|
|
@@ -807,7 +779,7 @@ export interface ProxyCall {
|
|
|
807
779
|
* Get the human-readable HTTP status message for the call.
|
|
808
780
|
* @returns The status message. This string is owned by #RestProxyCall and should not be freed.
|
|
809
781
|
*/
|
|
810
|
-
get_status_message(): string
|
|
782
|
+
get_status_message(): string
|
|
811
783
|
invoke_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
812
784
|
|
|
813
785
|
// Overloads of invoke_async
|
|
@@ -826,29 +798,29 @@ export interface ProxyCall {
|
|
|
826
798
|
* @param header The header name
|
|
827
799
|
* @returns The header value, or %NULL if it does not exist. This string is owned by the #RestProxyCall and should not be freed.
|
|
828
800
|
*/
|
|
829
|
-
lookup_header(header: string
|
|
801
|
+
lookup_header(header: string): string
|
|
830
802
|
/**
|
|
831
803
|
* Get the value of the parameter called `name`.
|
|
832
804
|
* @param name The paramter name
|
|
833
805
|
* @returns The parameter value, or %NULL if it does not exist. This string is owned by the #RestProxyCall and should not be freed.
|
|
834
806
|
*/
|
|
835
|
-
lookup_param(name: string
|
|
807
|
+
lookup_param(name: string): Param | null
|
|
836
808
|
/**
|
|
837
809
|
* Get the string value of the header `header` or %NULL if that header is not
|
|
838
810
|
* present or there are no headers.
|
|
839
811
|
* @param header The name of the header to lookup.
|
|
840
812
|
*/
|
|
841
|
-
lookup_response_header(header: string
|
|
813
|
+
lookup_response_header(header: string): string
|
|
842
814
|
/**
|
|
843
815
|
* Remove the header named `header` from the call.
|
|
844
816
|
* @param header The header name
|
|
845
817
|
*/
|
|
846
|
-
remove_header(header: string
|
|
818
|
+
remove_header(header: string): void
|
|
847
819
|
/**
|
|
848
820
|
* Remove the parameter named `name` from the call.
|
|
849
821
|
* @param name The paramter name
|
|
850
822
|
*/
|
|
851
|
-
remove_param(name: string
|
|
823
|
+
remove_param(name: string): void
|
|
852
824
|
/**
|
|
853
825
|
* Invoker for a virtual method to serialize the parameters for this
|
|
854
826
|
* #RestProxyCall.
|
|
@@ -863,12 +835,12 @@ export interface ProxyCall {
|
|
|
863
835
|
* <literal>http://www.example.com/test</literal>
|
|
864
836
|
* @param function_ The function to call
|
|
865
837
|
*/
|
|
866
|
-
set_function(function_: string
|
|
838
|
+
set_function(function_: string): void
|
|
867
839
|
/**
|
|
868
840
|
* Set the HTTP method to use when making the call, for example GET or POST.
|
|
869
841
|
* @param method The HTTP method to use
|
|
870
842
|
*/
|
|
871
|
-
set_method(method: string
|
|
843
|
+
set_method(method: string): void
|
|
872
844
|
/**
|
|
873
845
|
* Synchronously invokes `call`. After this function has returned,
|
|
874
846
|
* rest_proxy_call_get_payload() will return the result of this call.
|
|
@@ -959,7 +931,7 @@ export interface XmlParser {
|
|
|
959
931
|
* @param len the length of `data,` or -1 if `data` is a nul-terminated string
|
|
960
932
|
* @returns a new #RestXmlNode, or %NULL if the XML was invalid.
|
|
961
933
|
*/
|
|
962
|
-
parse_from_data(data: string
|
|
934
|
+
parse_from_data(data: string, len: number): XmlNode
|
|
963
935
|
|
|
964
936
|
// Class property signals of Rest-1.0.Rest.XmlParser
|
|
965
937
|
|
|
@@ -1048,17 +1020,17 @@ export interface Param {
|
|
|
1048
1020
|
* type "text/plain".
|
|
1049
1021
|
* @returns the MIME type
|
|
1050
1022
|
*/
|
|
1051
|
-
get_content_type(): string
|
|
1023
|
+
get_content_type(): string
|
|
1052
1024
|
/**
|
|
1053
1025
|
* Get the original file name of the parameter, if one is available.
|
|
1054
1026
|
* @returns the filename if set, or %NULL.
|
|
1055
1027
|
*/
|
|
1056
|
-
get_file_name(): string
|
|
1028
|
+
get_file_name(): string
|
|
1057
1029
|
/**
|
|
1058
1030
|
* Get the name of the parameter.
|
|
1059
1031
|
* @returns the parameter name.
|
|
1060
1032
|
*/
|
|
1061
|
-
get_name(): string
|
|
1033
|
+
get_name(): string
|
|
1062
1034
|
/**
|
|
1063
1035
|
* Determine if the parameter is a string value, i.e. the content type is "text/plain".
|
|
1064
1036
|
* @returns %TRUE if the parameter is a string, %FALSE otherwise.
|
|
@@ -1098,7 +1070,7 @@ export class Param {
|
|
|
1098
1070
|
* @param filename the original filename, or %NULL
|
|
1099
1071
|
* @returns a new #RestParam.
|
|
1100
1072
|
*/
|
|
1101
|
-
static new_full(name: string
|
|
1073
|
+
static new_full(name: string, use: MemoryUse, data: Uint8Array, content_type: string, filename: string | null): Param
|
|
1102
1074
|
/**
|
|
1103
1075
|
* A convience constructor to create a #RestParam from a given UTF-8 string.
|
|
1104
1076
|
* The resulting #RestParam will have a content type of "text/plain".
|
|
@@ -1108,7 +1080,7 @@ export class Param {
|
|
|
1108
1080
|
* @param string the parameter value
|
|
1109
1081
|
* @returns a new #RestParam.
|
|
1110
1082
|
*/
|
|
1111
|
-
static new_string(name: string
|
|
1083
|
+
static new_string(name: string, use: MemoryUse, string: string): Param
|
|
1112
1084
|
/**
|
|
1113
1085
|
* Create a new #RestParam called `name` with `length` bytes of `data` as the
|
|
1114
1086
|
* value. `content_type` is the type of the data as a MIME type, for example
|
|
@@ -1140,7 +1112,7 @@ export class Param {
|
|
|
1140
1112
|
* @param owner_dnotify a function to free/unref `owner` when the buffer is freed
|
|
1141
1113
|
* @returns a new #RestParam.
|
|
1142
1114
|
*/
|
|
1143
|
-
static new_with_owner(name: string
|
|
1115
|
+
static new_with_owner(name: string, data: Uint8Array, content_type: string, filename: string | null, owner: any | null, owner_dnotify: GLib.DestroyNotify | null): Param
|
|
1144
1116
|
}
|
|
1145
1117
|
|
|
1146
1118
|
export interface Params {
|
|
@@ -1177,7 +1149,7 @@ export interface Params {
|
|
|
1177
1149
|
* @param name a parameter name
|
|
1178
1150
|
* @returns a #RestParam or %NULL if the name doesn't exist
|
|
1179
1151
|
*/
|
|
1180
|
-
get(name: string
|
|
1152
|
+
get(name: string): Param | null
|
|
1181
1153
|
/**
|
|
1182
1154
|
* Increments the reference count of `self` by one.
|
|
1183
1155
|
* @returns @self
|
|
@@ -1187,7 +1159,7 @@ export interface Params {
|
|
|
1187
1159
|
* Remove the #RestParam called `name`.
|
|
1188
1160
|
* @param name a parameter name
|
|
1189
1161
|
*/
|
|
1190
|
-
remove(name: string
|
|
1162
|
+
remove(name: string): void
|
|
1191
1163
|
/**
|
|
1192
1164
|
* Decrements the reference count of `self` by one, freeing the structure when
|
|
1193
1165
|
* the reference count reaches zero.
|
|
@@ -1273,12 +1245,12 @@ export interface PkceCodeChallenge {
|
|
|
1273
1245
|
* Returns the Code Challenge for the Pkce verification.
|
|
1274
1246
|
* @returns the code_challenge
|
|
1275
1247
|
*/
|
|
1276
|
-
get_challenge(): string
|
|
1248
|
+
get_challenge(): string
|
|
1277
1249
|
/**
|
|
1278
1250
|
* Returns the Code Verifier for the Pkce verification.
|
|
1279
1251
|
* @returns the code_verifier
|
|
1280
1252
|
*/
|
|
1281
|
-
get_verifier(): string
|
|
1253
|
+
get_verifier(): string
|
|
1282
1254
|
}
|
|
1283
1255
|
|
|
1284
1256
|
/**
|
|
@@ -1408,27 +1380,27 @@ export interface XmlNode {
|
|
|
1408
1380
|
* @param attribute name of the attribute
|
|
1409
1381
|
* @param value value to set attribute to
|
|
1410
1382
|
*/
|
|
1411
|
-
add_attr(attribute: string
|
|
1383
|
+
add_attr(attribute: string, value: string): void
|
|
1412
1384
|
/**
|
|
1413
1385
|
* Adds a new node to the given parent node; to create the top-level node,
|
|
1414
1386
|
* parent should be %NULL.
|
|
1415
1387
|
* @param tag name of the child node
|
|
1416
1388
|
* @returns the newly added #RestXmlNode; the node object is owned by, and valid for the life time of, the #RestXmlCreator.
|
|
1417
1389
|
*/
|
|
1418
|
-
add_child(tag: string
|
|
1390
|
+
add_child(tag: string): XmlNode
|
|
1419
1391
|
/**
|
|
1420
1392
|
* Searches for the first child node of `start` named `tag`.
|
|
1421
1393
|
* @param tag the name of a node
|
|
1422
1394
|
* @returns the first child node, or %NULL if it doesn't exist.
|
|
1423
1395
|
*/
|
|
1424
|
-
find(tag: string
|
|
1396
|
+
find(tag: string): XmlNode
|
|
1425
1397
|
/**
|
|
1426
1398
|
* Get the value of the attribute named `attr_name,` or %NULL if it doesn't
|
|
1427
1399
|
* exist.
|
|
1428
1400
|
* @param attr_name the name of an attribute
|
|
1429
1401
|
* @returns the attribute value. This string is owned by #RestXmlNode and should not be freed.
|
|
1430
1402
|
*/
|
|
1431
|
-
get_attr(attr_name: string
|
|
1403
|
+
get_attr(attr_name: string): string
|
|
1432
1404
|
/**
|
|
1433
1405
|
* Recursively outputs given node and it's children.
|
|
1434
1406
|
* @returns xml string representing the node.
|
|
@@ -1438,7 +1410,7 @@ export interface XmlNode {
|
|
|
1438
1410
|
* Sets content for the given node.
|
|
1439
1411
|
* @param value the content
|
|
1440
1412
|
*/
|
|
1441
|
-
set_content(value: string
|
|
1413
|
+
set_content(value: string): void
|
|
1442
1414
|
}
|
|
1443
1415
|
|
|
1444
1416
|
/**
|
package/rest-1.0.d.ts
CHANGED
|
@@ -226,7 +226,7 @@ interface ProxyCallAsyncCallback {
|
|
|
226
226
|
(call: ProxyCall, error: GLib.Error, weak_object: GObject.Object, userdata: any | null): void
|
|
227
227
|
}
|
|
228
228
|
interface ProxyCallContinuousCallback {
|
|
229
|
-
(call: ProxyCall, buf: string
|
|
229
|
+
(call: ProxyCall, buf: string, len: number, error: GLib.Error, weak_object: GObject.Object, userdata: any | null): void
|
|
230
230
|
}
|
|
231
231
|
interface ProxyCallUploadCallback {
|
|
232
232
|
(call: ProxyCall, total: number, uploaded: number, error: GLib.Error, weak_object: GObject.Object, userdata: any | null): void
|
|
@@ -239,14 +239,6 @@ module OAuth2Proxy {
|
|
|
239
239
|
|
|
240
240
|
// Own constructor properties of Rest-1.0.Rest.OAuth2Proxy
|
|
241
241
|
|
|
242
|
-
access_token?: string | null
|
|
243
|
-
auth_url?: string | null
|
|
244
|
-
client_id?: string | null
|
|
245
|
-
client_secret?: string | null
|
|
246
|
-
expiration_date?: GLib.DateTime | null
|
|
247
|
-
redirect_uri?: string | null
|
|
248
|
-
refresh_token?: string | null
|
|
249
|
-
token_url?: string | null
|
|
250
242
|
accessToken?: string | null
|
|
251
243
|
authUrl?: string | null
|
|
252
244
|
clientId?: string | null
|
|
@@ -263,21 +255,13 @@ interface OAuth2Proxy {
|
|
|
263
255
|
|
|
264
256
|
// Own properties of Rest-1.0.Rest.OAuth2Proxy
|
|
265
257
|
|
|
266
|
-
access_token: string | null
|
|
267
258
|
accessToken: string | null
|
|
268
|
-
auth_url: string | null
|
|
269
259
|
authUrl: string | null
|
|
270
|
-
client_id: string | null
|
|
271
260
|
clientId: string | null
|
|
272
|
-
client_secret: string | null
|
|
273
261
|
clientSecret: string | null
|
|
274
|
-
expiration_date: GLib.DateTime
|
|
275
262
|
expirationDate: GLib.DateTime
|
|
276
|
-
redirect_uri: string | null
|
|
277
263
|
redirectUri: string | null
|
|
278
|
-
refresh_token: string | null
|
|
279
264
|
refreshToken: string | null
|
|
280
|
-
token_url: string | null
|
|
281
265
|
tokenUrl: string | null
|
|
282
266
|
|
|
283
267
|
// Own fields of Rest-1.0.Rest.OAuth2Proxy
|
|
@@ -286,8 +270,8 @@ interface OAuth2Proxy {
|
|
|
286
270
|
|
|
287
271
|
// Owm methods of Rest-1.0.Rest.OAuth2Proxy
|
|
288
272
|
|
|
289
|
-
build_authorization_url(code_challenge: string
|
|
290
|
-
fetch_access_token_async(authorization_code: string
|
|
273
|
+
build_authorization_url(code_challenge: string, scope: string | null): [ /* returnType */ string | null, /* state */ string | null ]
|
|
274
|
+
fetch_access_token_async(authorization_code: string, code_verifier: string, cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
291
275
|
|
|
292
276
|
// Overloads of fetch_access_token_async
|
|
293
277
|
|
|
@@ -300,16 +284,16 @@ interface OAuth2Proxy {
|
|
|
300
284
|
* @param cancellable
|
|
301
285
|
* @returns A Promise of the result of {@link fetch_access_token_async}
|
|
302
286
|
*/
|
|
303
|
-
fetch_access_token_async(authorization_code: string
|
|
287
|
+
fetch_access_token_async(authorization_code: string, code_verifier: string, cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
|
|
304
288
|
fetch_access_token_finish(result: Gio.AsyncResult): boolean
|
|
305
|
-
get_access_token(): string
|
|
306
|
-
get_auth_url(): string
|
|
307
|
-
get_client_id(): string
|
|
308
|
-
get_client_secret(): string
|
|
289
|
+
get_access_token(): string
|
|
290
|
+
get_auth_url(): string
|
|
291
|
+
get_client_id(): string
|
|
292
|
+
get_client_secret(): string
|
|
309
293
|
get_expiration_date(): GLib.DateTime
|
|
310
|
-
get_redirect_uri(): string
|
|
311
|
-
get_refresh_token(): string
|
|
312
|
-
get_token_url(): string
|
|
294
|
+
get_redirect_uri(): string
|
|
295
|
+
get_refresh_token(): string
|
|
296
|
+
get_token_url(): string
|
|
313
297
|
refresh_access_token(): boolean
|
|
314
298
|
refresh_access_token_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
315
299
|
|
|
@@ -324,14 +308,14 @@ interface OAuth2Proxy {
|
|
|
324
308
|
*/
|
|
325
309
|
refresh_access_token_async(cancellable: Gio.Cancellable | null): globalThis.Promise<boolean>
|
|
326
310
|
refresh_access_token_finish(result: Gio.AsyncResult): boolean
|
|
327
|
-
set_access_token(access_token: string
|
|
328
|
-
set_auth_url(tokenurl: string
|
|
329
|
-
set_client_id(client_id: string
|
|
330
|
-
set_client_secret(client_secret: string
|
|
311
|
+
set_access_token(access_token: string): void
|
|
312
|
+
set_auth_url(tokenurl: string): void
|
|
313
|
+
set_client_id(client_id: string): void
|
|
314
|
+
set_client_secret(client_secret: string): void
|
|
331
315
|
set_expiration_date(expiration_date: GLib.DateTime): void
|
|
332
|
-
set_redirect_uri(redirect_uri: string
|
|
333
|
-
set_refresh_token(refresh_token: string
|
|
334
|
-
set_token_url(tokenurl: string
|
|
316
|
+
set_redirect_uri(redirect_uri: string): void
|
|
317
|
+
set_refresh_token(refresh_token: string): void
|
|
318
|
+
set_token_url(tokenurl: string): void
|
|
335
319
|
|
|
336
320
|
// Own virtual methods of Rest-1.0.Rest.OAuth2Proxy
|
|
337
321
|
|
|
@@ -414,7 +398,7 @@ class OAuth2Proxy extends Proxy {
|
|
|
414
398
|
* @param baseurl
|
|
415
399
|
* @returns a newly created #RestOAuth2Proxy
|
|
416
400
|
*/
|
|
417
|
-
constructor(authurl: string
|
|
401
|
+
constructor(authurl: string, tokenurl: string, redirecturl: string, client_id: string, client_secret: string, baseurl: string)
|
|
418
402
|
/**
|
|
419
403
|
* Create a new #RestOAuth2Proxy.
|
|
420
404
|
* @constructor
|
|
@@ -426,7 +410,7 @@ class OAuth2Proxy extends Proxy {
|
|
|
426
410
|
* @param baseurl
|
|
427
411
|
* @returns a newly created #RestOAuth2Proxy
|
|
428
412
|
*/
|
|
429
|
-
static new(authurl: string
|
|
413
|
+
static new(authurl: string, tokenurl: string, redirecturl: string, client_id: string, client_secret: string, baseurl: string): OAuth2Proxy
|
|
430
414
|
|
|
431
415
|
// Overloads of new
|
|
432
416
|
|
|
@@ -442,7 +426,7 @@ class OAuth2Proxy extends Proxy {
|
|
|
442
426
|
* @param binding_required whether the URL needs to be bound before calling
|
|
443
427
|
* @returns A new #RestProxy.
|
|
444
428
|
*/
|
|
445
|
-
static new(url_format: string
|
|
429
|
+
static new(url_format: string, binding_required: boolean): Proxy
|
|
446
430
|
_init(config?: OAuth2Proxy.ConstructorProperties): void
|
|
447
431
|
}
|
|
448
432
|
|
|
@@ -493,20 +477,14 @@ module Proxy {
|
|
|
493
477
|
|
|
494
478
|
// Own constructor properties of Rest-1.0.Rest.Proxy
|
|
495
479
|
|
|
496
|
-
binding_required?: boolean | null
|
|
497
|
-
disable_cookies?: boolean | null
|
|
498
|
-
password?: string | null
|
|
499
|
-
ssl_ca_file?: string | null
|
|
500
|
-
ssl_strict?: boolean | null
|
|
501
|
-
url_format?: string | null
|
|
502
|
-
user_agent?: string | null
|
|
503
|
-
username?: string | null
|
|
504
480
|
bindingRequired?: boolean | null
|
|
505
481
|
disableCookies?: boolean | null
|
|
482
|
+
password?: string | null
|
|
506
483
|
sslCaFile?: string | null
|
|
507
484
|
sslStrict?: boolean | null
|
|
508
485
|
urlFormat?: string | null
|
|
509
486
|
userAgent?: string | null
|
|
487
|
+
username?: string | null
|
|
510
488
|
}
|
|
511
489
|
|
|
512
490
|
}
|
|
@@ -515,18 +493,12 @@ interface Proxy {
|
|
|
515
493
|
|
|
516
494
|
// Own properties of Rest-1.0.Rest.Proxy
|
|
517
495
|
|
|
518
|
-
binding_required: boolean
|
|
519
496
|
bindingRequired: boolean
|
|
520
|
-
readonly disable_cookies: boolean
|
|
521
497
|
readonly disableCookies: boolean
|
|
522
498
|
password: string | null
|
|
523
|
-
ssl_ca_file: string | null
|
|
524
499
|
sslCaFile: string | null
|
|
525
|
-
ssl_strict: boolean
|
|
526
500
|
sslStrict: boolean
|
|
527
|
-
url_format: string | null
|
|
528
501
|
urlFormat: string | null
|
|
529
|
-
user_agent: string | null
|
|
530
502
|
userAgent: string | null
|
|
531
503
|
username: string | null
|
|
532
504
|
|
|
@@ -554,14 +526,14 @@ interface Proxy {
|
|
|
554
526
|
* @param feature A #SoupSessionFeature
|
|
555
527
|
*/
|
|
556
528
|
add_soup_feature(feature: Soup.SessionFeature): void
|
|
557
|
-
get_user_agent(): string
|
|
529
|
+
get_user_agent(): string
|
|
558
530
|
/**
|
|
559
531
|
* Create a new #RestProxyCall for making a call to the web service. This call
|
|
560
532
|
* is one-shot and should not be re-used for making multiple calls.
|
|
561
533
|
* @returns a new #RestProxyCall.
|
|
562
534
|
*/
|
|
563
535
|
new_call(): ProxyCall
|
|
564
|
-
set_user_agent(user_agent: string
|
|
536
|
+
set_user_agent(user_agent: string): void
|
|
565
537
|
|
|
566
538
|
// Own virtual methods of Rest-1.0.Rest.Proxy
|
|
567
539
|
|
|
@@ -632,7 +604,7 @@ class Proxy extends GObject.Object {
|
|
|
632
604
|
* @param binding_required whether the URL needs to be bound before calling
|
|
633
605
|
* @returns A new #RestProxy.
|
|
634
606
|
*/
|
|
635
|
-
constructor(url_format: string
|
|
607
|
+
constructor(url_format: string, binding_required: boolean)
|
|
636
608
|
/**
|
|
637
609
|
* Create a new #RestProxy for the specified endpoint `url_format,` using the
|
|
638
610
|
* "GET" method.
|
|
@@ -645,7 +617,7 @@ class Proxy extends GObject.Object {
|
|
|
645
617
|
* @param binding_required whether the URL needs to be bound before calling
|
|
646
618
|
* @returns A new #RestProxy.
|
|
647
619
|
*/
|
|
648
|
-
static new(url_format: string
|
|
620
|
+
static new(url_format: string, binding_required: boolean): Proxy
|
|
649
621
|
/**
|
|
650
622
|
* Create a new #RestProxy for the specified endpoint `url_format,` using the
|
|
651
623
|
* "GET" method.
|
|
@@ -660,7 +632,7 @@ class Proxy extends GObject.Object {
|
|
|
660
632
|
* @param password the password provided by the user or client
|
|
661
633
|
* @returns A new #RestProxy.
|
|
662
634
|
*/
|
|
663
|
-
static new_with_authentication(url_format: string
|
|
635
|
+
static new_with_authentication(url_format: string, binding_required: boolean, username: string, password: string): Proxy
|
|
664
636
|
_init(config?: Proxy.ConstructorProperties): void
|
|
665
637
|
}
|
|
666
638
|
|
|
@@ -757,7 +729,7 @@ interface ProxyCall {
|
|
|
757
729
|
* @param header The name of the header to set
|
|
758
730
|
* @param value The value of the header
|
|
759
731
|
*/
|
|
760
|
-
add_header(header: string
|
|
732
|
+
add_header(header: string, value: string): void
|
|
761
733
|
/**
|
|
762
734
|
* Add a query parameter called `param` with the string value `value` to the call.
|
|
763
735
|
* If a parameter with this name already exists, the new value will replace the
|
|
@@ -765,7 +737,7 @@ interface ProxyCall {
|
|
|
765
737
|
* @param name The name of the parameter to set
|
|
766
738
|
* @param value The value of the parameter
|
|
767
739
|
*/
|
|
768
|
-
add_param(name: string
|
|
740
|
+
add_param(name: string, value: string): void
|
|
769
741
|
/**
|
|
770
742
|
* Add a query parameter `param` to the call.
|
|
771
743
|
* If a parameter with this name already exists, the new value will replace the
|
|
@@ -777,12 +749,12 @@ interface ProxyCall {
|
|
|
777
749
|
* Get the REST function that is going to be called on the proxy.
|
|
778
750
|
* @returns The REST "function" for the current call, see also rest_proxy_call_set_function(). This string is owned by the #RestProxyCall and should not be freed.
|
|
779
751
|
*/
|
|
780
|
-
get_function(): string
|
|
752
|
+
get_function(): string
|
|
781
753
|
/**
|
|
782
754
|
* Get the HTTP method to use when making the call, for example GET or POST.
|
|
783
755
|
* @returns the HTTP method
|
|
784
756
|
*/
|
|
785
|
-
get_method(): string
|
|
757
|
+
get_method(): string
|
|
786
758
|
/**
|
|
787
759
|
* Get the parameters as a #RestParams of parameter names to values. The
|
|
788
760
|
* returned value is owned by the RestProxyCall instance and should not
|
|
@@ -794,7 +766,7 @@ interface ProxyCall {
|
|
|
794
766
|
* Get the return payload.
|
|
795
767
|
* @returns A pointer to the payload. This is owned by #RestProxyCall and should not be freed.
|
|
796
768
|
*/
|
|
797
|
-
get_payload(): string
|
|
769
|
+
get_payload(): string
|
|
798
770
|
/**
|
|
799
771
|
* Get the length of the return payload.
|
|
800
772
|
* @returns the length of the payload in bytes.
|
|
@@ -809,7 +781,7 @@ interface ProxyCall {
|
|
|
809
781
|
* Get the human-readable HTTP status message for the call.
|
|
810
782
|
* @returns The status message. This string is owned by #RestProxyCall and should not be freed.
|
|
811
783
|
*/
|
|
812
|
-
get_status_message(): string
|
|
784
|
+
get_status_message(): string
|
|
813
785
|
invoke_async(cancellable: Gio.Cancellable | null, callback: Gio.AsyncReadyCallback<this> | null): void
|
|
814
786
|
|
|
815
787
|
// Overloads of invoke_async
|
|
@@ -828,29 +800,29 @@ interface ProxyCall {
|
|
|
828
800
|
* @param header The header name
|
|
829
801
|
* @returns The header value, or %NULL if it does not exist. This string is owned by the #RestProxyCall and should not be freed.
|
|
830
802
|
*/
|
|
831
|
-
lookup_header(header: string
|
|
803
|
+
lookup_header(header: string): string
|
|
832
804
|
/**
|
|
833
805
|
* Get the value of the parameter called `name`.
|
|
834
806
|
* @param name The paramter name
|
|
835
807
|
* @returns The parameter value, or %NULL if it does not exist. This string is owned by the #RestProxyCall and should not be freed.
|
|
836
808
|
*/
|
|
837
|
-
lookup_param(name: string
|
|
809
|
+
lookup_param(name: string): Param | null
|
|
838
810
|
/**
|
|
839
811
|
* Get the string value of the header `header` or %NULL if that header is not
|
|
840
812
|
* present or there are no headers.
|
|
841
813
|
* @param header The name of the header to lookup.
|
|
842
814
|
*/
|
|
843
|
-
lookup_response_header(header: string
|
|
815
|
+
lookup_response_header(header: string): string
|
|
844
816
|
/**
|
|
845
817
|
* Remove the header named `header` from the call.
|
|
846
818
|
* @param header The header name
|
|
847
819
|
*/
|
|
848
|
-
remove_header(header: string
|
|
820
|
+
remove_header(header: string): void
|
|
849
821
|
/**
|
|
850
822
|
* Remove the parameter named `name` from the call.
|
|
851
823
|
* @param name The paramter name
|
|
852
824
|
*/
|
|
853
|
-
remove_param(name: string
|
|
825
|
+
remove_param(name: string): void
|
|
854
826
|
/**
|
|
855
827
|
* Invoker for a virtual method to serialize the parameters for this
|
|
856
828
|
* #RestProxyCall.
|
|
@@ -865,12 +837,12 @@ interface ProxyCall {
|
|
|
865
837
|
* <literal>http://www.example.com/test</literal>
|
|
866
838
|
* @param function_ The function to call
|
|
867
839
|
*/
|
|
868
|
-
set_function(function_: string
|
|
840
|
+
set_function(function_: string): void
|
|
869
841
|
/**
|
|
870
842
|
* Set the HTTP method to use when making the call, for example GET or POST.
|
|
871
843
|
* @param method The HTTP method to use
|
|
872
844
|
*/
|
|
873
|
-
set_method(method: string
|
|
845
|
+
set_method(method: string): void
|
|
874
846
|
/**
|
|
875
847
|
* Synchronously invokes `call`. After this function has returned,
|
|
876
848
|
* rest_proxy_call_get_payload() will return the result of this call.
|
|
@@ -961,7 +933,7 @@ interface XmlParser {
|
|
|
961
933
|
* @param len the length of `data,` or -1 if `data` is a nul-terminated string
|
|
962
934
|
* @returns a new #RestXmlNode, or %NULL if the XML was invalid.
|
|
963
935
|
*/
|
|
964
|
-
parse_from_data(data: string
|
|
936
|
+
parse_from_data(data: string, len: number): XmlNode
|
|
965
937
|
|
|
966
938
|
// Class property signals of Rest-1.0.Rest.XmlParser
|
|
967
939
|
|
|
@@ -1050,17 +1022,17 @@ interface Param {
|
|
|
1050
1022
|
* type "text/plain".
|
|
1051
1023
|
* @returns the MIME type
|
|
1052
1024
|
*/
|
|
1053
|
-
get_content_type(): string
|
|
1025
|
+
get_content_type(): string
|
|
1054
1026
|
/**
|
|
1055
1027
|
* Get the original file name of the parameter, if one is available.
|
|
1056
1028
|
* @returns the filename if set, or %NULL.
|
|
1057
1029
|
*/
|
|
1058
|
-
get_file_name(): string
|
|
1030
|
+
get_file_name(): string
|
|
1059
1031
|
/**
|
|
1060
1032
|
* Get the name of the parameter.
|
|
1061
1033
|
* @returns the parameter name.
|
|
1062
1034
|
*/
|
|
1063
|
-
get_name(): string
|
|
1035
|
+
get_name(): string
|
|
1064
1036
|
/**
|
|
1065
1037
|
* Determine if the parameter is a string value, i.e. the content type is "text/plain".
|
|
1066
1038
|
* @returns %TRUE if the parameter is a string, %FALSE otherwise.
|
|
@@ -1100,7 +1072,7 @@ class Param {
|
|
|
1100
1072
|
* @param filename the original filename, or %NULL
|
|
1101
1073
|
* @returns a new #RestParam.
|
|
1102
1074
|
*/
|
|
1103
|
-
static new_full(name: string
|
|
1075
|
+
static new_full(name: string, use: MemoryUse, data: Uint8Array, content_type: string, filename: string | null): Param
|
|
1104
1076
|
/**
|
|
1105
1077
|
* A convience constructor to create a #RestParam from a given UTF-8 string.
|
|
1106
1078
|
* The resulting #RestParam will have a content type of "text/plain".
|
|
@@ -1110,7 +1082,7 @@ class Param {
|
|
|
1110
1082
|
* @param string the parameter value
|
|
1111
1083
|
* @returns a new #RestParam.
|
|
1112
1084
|
*/
|
|
1113
|
-
static new_string(name: string
|
|
1085
|
+
static new_string(name: string, use: MemoryUse, string: string): Param
|
|
1114
1086
|
/**
|
|
1115
1087
|
* Create a new #RestParam called `name` with `length` bytes of `data` as the
|
|
1116
1088
|
* value. `content_type` is the type of the data as a MIME type, for example
|
|
@@ -1142,7 +1114,7 @@ class Param {
|
|
|
1142
1114
|
* @param owner_dnotify a function to free/unref `owner` when the buffer is freed
|
|
1143
1115
|
* @returns a new #RestParam.
|
|
1144
1116
|
*/
|
|
1145
|
-
static new_with_owner(name: string
|
|
1117
|
+
static new_with_owner(name: string, data: Uint8Array, content_type: string, filename: string | null, owner: any | null, owner_dnotify: GLib.DestroyNotify | null): Param
|
|
1146
1118
|
}
|
|
1147
1119
|
|
|
1148
1120
|
interface Params {
|
|
@@ -1179,7 +1151,7 @@ interface Params {
|
|
|
1179
1151
|
* @param name a parameter name
|
|
1180
1152
|
* @returns a #RestParam or %NULL if the name doesn't exist
|
|
1181
1153
|
*/
|
|
1182
|
-
get(name: string
|
|
1154
|
+
get(name: string): Param | null
|
|
1183
1155
|
/**
|
|
1184
1156
|
* Increments the reference count of `self` by one.
|
|
1185
1157
|
* @returns @self
|
|
@@ -1189,7 +1161,7 @@ interface Params {
|
|
|
1189
1161
|
* Remove the #RestParam called `name`.
|
|
1190
1162
|
* @param name a parameter name
|
|
1191
1163
|
*/
|
|
1192
|
-
remove(name: string
|
|
1164
|
+
remove(name: string): void
|
|
1193
1165
|
/**
|
|
1194
1166
|
* Decrements the reference count of `self` by one, freeing the structure when
|
|
1195
1167
|
* the reference count reaches zero.
|
|
@@ -1275,12 +1247,12 @@ interface PkceCodeChallenge {
|
|
|
1275
1247
|
* Returns the Code Challenge for the Pkce verification.
|
|
1276
1248
|
* @returns the code_challenge
|
|
1277
1249
|
*/
|
|
1278
|
-
get_challenge(): string
|
|
1250
|
+
get_challenge(): string
|
|
1279
1251
|
/**
|
|
1280
1252
|
* Returns the Code Verifier for the Pkce verification.
|
|
1281
1253
|
* @returns the code_verifier
|
|
1282
1254
|
*/
|
|
1283
|
-
get_verifier(): string
|
|
1255
|
+
get_verifier(): string
|
|
1284
1256
|
}
|
|
1285
1257
|
|
|
1286
1258
|
/**
|
|
@@ -1410,27 +1382,27 @@ interface XmlNode {
|
|
|
1410
1382
|
* @param attribute name of the attribute
|
|
1411
1383
|
* @param value value to set attribute to
|
|
1412
1384
|
*/
|
|
1413
|
-
add_attr(attribute: string
|
|
1385
|
+
add_attr(attribute: string, value: string): void
|
|
1414
1386
|
/**
|
|
1415
1387
|
* Adds a new node to the given parent node; to create the top-level node,
|
|
1416
1388
|
* parent should be %NULL.
|
|
1417
1389
|
* @param tag name of the child node
|
|
1418
1390
|
* @returns the newly added #RestXmlNode; the node object is owned by, and valid for the life time of, the #RestXmlCreator.
|
|
1419
1391
|
*/
|
|
1420
|
-
add_child(tag: string
|
|
1392
|
+
add_child(tag: string): XmlNode
|
|
1421
1393
|
/**
|
|
1422
1394
|
* Searches for the first child node of `start` named `tag`.
|
|
1423
1395
|
* @param tag the name of a node
|
|
1424
1396
|
* @returns the first child node, or %NULL if it doesn't exist.
|
|
1425
1397
|
*/
|
|
1426
|
-
find(tag: string
|
|
1398
|
+
find(tag: string): XmlNode
|
|
1427
1399
|
/**
|
|
1428
1400
|
* Get the value of the attribute named `attr_name,` or %NULL if it doesn't
|
|
1429
1401
|
* exist.
|
|
1430
1402
|
* @param attr_name the name of an attribute
|
|
1431
1403
|
* @returns the attribute value. This string is owned by #RestXmlNode and should not be freed.
|
|
1432
1404
|
*/
|
|
1433
|
-
get_attr(attr_name: string
|
|
1405
|
+
get_attr(attr_name: string): string
|
|
1434
1406
|
/**
|
|
1435
1407
|
* Recursively outputs given node and it's children.
|
|
1436
1408
|
* @returns xml string representing the node.
|
|
@@ -1440,7 +1412,7 @@ interface XmlNode {
|
|
|
1440
1412
|
* Sets content for the given node.
|
|
1441
1413
|
* @param value the content
|
|
1442
1414
|
*/
|
|
1443
|
-
set_content(value: string
|
|
1415
|
+
set_content(value: string): void
|
|
1444
1416
|
}
|
|
1445
1417
|
|
|
1446
1418
|
/**
|