@izak0s/spacebring-api 0.1.0 → 1.0.0
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/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -13,14 +13,14 @@ interface paths {
|
|
|
13
13
|
cookie?: never;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Retrieve
|
|
17
|
-
* @description Retrieve all
|
|
16
|
+
* Retrieve alternative currencies
|
|
17
|
+
* @description Retrieve all alternative currencies in the location. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
|
|
18
18
|
*/
|
|
19
19
|
get: operations["getAltCurrencies"];
|
|
20
20
|
put?: never;
|
|
21
21
|
/**
|
|
22
|
-
* Create an
|
|
23
|
-
* @description Create an
|
|
22
|
+
* Create an alternative currency
|
|
23
|
+
* @description Create an alternative currency. <h3>OAuth</h3>Required scopes: <code>invoices</code>
|
|
24
24
|
*/
|
|
25
25
|
post: operations["createAltCurrency"];
|
|
26
26
|
delete?: never;
|
|
@@ -40,15 +40,15 @@ interface paths {
|
|
|
40
40
|
put?: never;
|
|
41
41
|
post?: never;
|
|
42
42
|
/**
|
|
43
|
-
* Delete an
|
|
44
|
-
* @description Delete an
|
|
43
|
+
* Delete an alternative currency
|
|
44
|
+
* @description Delete an alternative currency. <h3>OAuth</h3>Required scopes: <code>invoices</code>
|
|
45
45
|
*/
|
|
46
46
|
delete: operations["deleteAltCurrency"];
|
|
47
47
|
options?: never;
|
|
48
48
|
head?: never;
|
|
49
49
|
/**
|
|
50
|
-
* Update an
|
|
51
|
-
* @description Update an
|
|
50
|
+
* Update an alternative currency
|
|
51
|
+
* @description Update an alternative currency. <h3>OAuth</h3>Required scopes: <code>invoices</code>
|
|
52
52
|
*/
|
|
53
53
|
patch: operations["updateAltCurrency"];
|
|
54
54
|
trace?: never;
|
|
@@ -2266,7 +2266,7 @@ interface components {
|
|
|
2266
2266
|
* @description Exchange rate provider when auto-update is enabled.
|
|
2267
2267
|
* @enum {string}
|
|
2268
2268
|
*/
|
|
2269
|
-
provider?: "fastForex" | "nbu";
|
|
2269
|
+
provider?: "fastForex" | "nbu" | "bcra";
|
|
2270
2270
|
};
|
|
2271
2271
|
/** @description Pre-built query string for the next page of results. Contains all active filter parameters combined with the next page token, ready to append to the endpoint URL. */
|
|
2272
2272
|
searchQueryNext: string;
|
|
@@ -10231,7 +10231,7 @@ interface components {
|
|
|
10231
10231
|
* @description Exchange rate provider when auto-update is enabled.
|
|
10232
10232
|
* @enum {string}
|
|
10233
10233
|
*/
|
|
10234
|
-
provider: "fastForex" | "nbu";
|
|
10234
|
+
provider: "fastForex" | "nbu" | "bcra";
|
|
10235
10235
|
} | {
|
|
10236
10236
|
/** @description Exchange rate relative to the location main currency. */
|
|
10237
10237
|
exchangeRate: number;
|
|
@@ -10248,7 +10248,7 @@ interface components {
|
|
|
10248
10248
|
* @description Exchange rate provider when auto-update is enabled.
|
|
10249
10249
|
* @enum {string}
|
|
10250
10250
|
*/
|
|
10251
|
-
provider: "fastForex" | "nbu";
|
|
10251
|
+
provider: "fastForex" | "nbu" | "bcra";
|
|
10252
10252
|
} | {
|
|
10253
10253
|
/** @description Exchange rate relative to the location main currency. */
|
|
10254
10254
|
exchangeRate: number;
|
|
@@ -13750,7 +13750,7 @@ interface operations {
|
|
|
13750
13750
|
"spacebring-network-id"?: string;
|
|
13751
13751
|
};
|
|
13752
13752
|
path: {
|
|
13753
|
-
/** @description The id of the
|
|
13753
|
+
/** @description The id of the alternative currency */
|
|
13754
13754
|
id: string;
|
|
13755
13755
|
};
|
|
13756
13756
|
cookie?: never;
|
|
@@ -13783,7 +13783,7 @@ interface operations {
|
|
|
13783
13783
|
"spacebring-network-id"?: string;
|
|
13784
13784
|
};
|
|
13785
13785
|
path: {
|
|
13786
|
-
/** @description The id of the
|
|
13786
|
+
/** @description The id of the alternative currency */
|
|
13787
13787
|
id: string;
|
|
13788
13788
|
};
|
|
13789
13789
|
cookie?: never;
|
|
@@ -19915,7 +19915,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
19915
19915
|
exchangeRate: number;
|
|
19916
19916
|
id: string;
|
|
19917
19917
|
locationRef: string;
|
|
19918
|
-
provider?: "fastForex" | "nbu";
|
|
19918
|
+
provider?: "fastForex" | "nbu" | "bcra";
|
|
19919
19919
|
}, void, undefined>;
|
|
19920
19920
|
create(body: NonNullable<operations["createAltCurrency"]["requestBody"]>["content"]["application/json"]): Promise<{
|
|
19921
19921
|
createDate: string;
|
|
@@ -19923,7 +19923,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
19923
19923
|
exchangeRate: number;
|
|
19924
19924
|
id: string;
|
|
19925
19925
|
locationRef: string;
|
|
19926
|
-
provider?: "fastForex" | "nbu";
|
|
19926
|
+
provider?: "fastForex" | "nbu" | "bcra";
|
|
19927
19927
|
}>;
|
|
19928
19928
|
update(id: string, body: NonNullable<operations["updateAltCurrency"]["requestBody"]>["content"]["application/json"]): Promise<undefined>;
|
|
19929
19929
|
delete(id: string): Promise<undefined>;
|
package/dist/index.d.ts
CHANGED
|
@@ -13,14 +13,14 @@ interface paths {
|
|
|
13
13
|
cookie?: never;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Retrieve
|
|
17
|
-
* @description Retrieve all
|
|
16
|
+
* Retrieve alternative currencies
|
|
17
|
+
* @description Retrieve all alternative currencies in the location. <h3>OAuth</h3>Required scopes: <code>invoices.readonly</code> or <code>invoices</code>
|
|
18
18
|
*/
|
|
19
19
|
get: operations["getAltCurrencies"];
|
|
20
20
|
put?: never;
|
|
21
21
|
/**
|
|
22
|
-
* Create an
|
|
23
|
-
* @description Create an
|
|
22
|
+
* Create an alternative currency
|
|
23
|
+
* @description Create an alternative currency. <h3>OAuth</h3>Required scopes: <code>invoices</code>
|
|
24
24
|
*/
|
|
25
25
|
post: operations["createAltCurrency"];
|
|
26
26
|
delete?: never;
|
|
@@ -40,15 +40,15 @@ interface paths {
|
|
|
40
40
|
put?: never;
|
|
41
41
|
post?: never;
|
|
42
42
|
/**
|
|
43
|
-
* Delete an
|
|
44
|
-
* @description Delete an
|
|
43
|
+
* Delete an alternative currency
|
|
44
|
+
* @description Delete an alternative currency. <h3>OAuth</h3>Required scopes: <code>invoices</code>
|
|
45
45
|
*/
|
|
46
46
|
delete: operations["deleteAltCurrency"];
|
|
47
47
|
options?: never;
|
|
48
48
|
head?: never;
|
|
49
49
|
/**
|
|
50
|
-
* Update an
|
|
51
|
-
* @description Update an
|
|
50
|
+
* Update an alternative currency
|
|
51
|
+
* @description Update an alternative currency. <h3>OAuth</h3>Required scopes: <code>invoices</code>
|
|
52
52
|
*/
|
|
53
53
|
patch: operations["updateAltCurrency"];
|
|
54
54
|
trace?: never;
|
|
@@ -2266,7 +2266,7 @@ interface components {
|
|
|
2266
2266
|
* @description Exchange rate provider when auto-update is enabled.
|
|
2267
2267
|
* @enum {string}
|
|
2268
2268
|
*/
|
|
2269
|
-
provider?: "fastForex" | "nbu";
|
|
2269
|
+
provider?: "fastForex" | "nbu" | "bcra";
|
|
2270
2270
|
};
|
|
2271
2271
|
/** @description Pre-built query string for the next page of results. Contains all active filter parameters combined with the next page token, ready to append to the endpoint URL. */
|
|
2272
2272
|
searchQueryNext: string;
|
|
@@ -10231,7 +10231,7 @@ interface components {
|
|
|
10231
10231
|
* @description Exchange rate provider when auto-update is enabled.
|
|
10232
10232
|
* @enum {string}
|
|
10233
10233
|
*/
|
|
10234
|
-
provider: "fastForex" | "nbu";
|
|
10234
|
+
provider: "fastForex" | "nbu" | "bcra";
|
|
10235
10235
|
} | {
|
|
10236
10236
|
/** @description Exchange rate relative to the location main currency. */
|
|
10237
10237
|
exchangeRate: number;
|
|
@@ -10248,7 +10248,7 @@ interface components {
|
|
|
10248
10248
|
* @description Exchange rate provider when auto-update is enabled.
|
|
10249
10249
|
* @enum {string}
|
|
10250
10250
|
*/
|
|
10251
|
-
provider: "fastForex" | "nbu";
|
|
10251
|
+
provider: "fastForex" | "nbu" | "bcra";
|
|
10252
10252
|
} | {
|
|
10253
10253
|
/** @description Exchange rate relative to the location main currency. */
|
|
10254
10254
|
exchangeRate: number;
|
|
@@ -13750,7 +13750,7 @@ interface operations {
|
|
|
13750
13750
|
"spacebring-network-id"?: string;
|
|
13751
13751
|
};
|
|
13752
13752
|
path: {
|
|
13753
|
-
/** @description The id of the
|
|
13753
|
+
/** @description The id of the alternative currency */
|
|
13754
13754
|
id: string;
|
|
13755
13755
|
};
|
|
13756
13756
|
cookie?: never;
|
|
@@ -13783,7 +13783,7 @@ interface operations {
|
|
|
13783
13783
|
"spacebring-network-id"?: string;
|
|
13784
13784
|
};
|
|
13785
13785
|
path: {
|
|
13786
|
-
/** @description The id of the
|
|
13786
|
+
/** @description The id of the alternative currency */
|
|
13787
13787
|
id: string;
|
|
13788
13788
|
};
|
|
13789
13789
|
cookie?: never;
|
|
@@ -19915,7 +19915,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
19915
19915
|
exchangeRate: number;
|
|
19916
19916
|
id: string;
|
|
19917
19917
|
locationRef: string;
|
|
19918
|
-
provider?: "fastForex" | "nbu";
|
|
19918
|
+
provider?: "fastForex" | "nbu" | "bcra";
|
|
19919
19919
|
}, void, undefined>;
|
|
19920
19920
|
create(body: NonNullable<operations["createAltCurrency"]["requestBody"]>["content"]["application/json"]): Promise<{
|
|
19921
19921
|
createDate: string;
|
|
@@ -19923,7 +19923,7 @@ declare function createResources(client: Client<paths>, defaults: SpacebringDefa
|
|
|
19923
19923
|
exchangeRate: number;
|
|
19924
19924
|
id: string;
|
|
19925
19925
|
locationRef: string;
|
|
19926
|
-
provider?: "fastForex" | "nbu";
|
|
19926
|
+
provider?: "fastForex" | "nbu" | "bcra";
|
|
19927
19927
|
}>;
|
|
19928
19928
|
update(id: string, body: NonNullable<operations["updateAltCurrency"]["requestBody"]>["content"]["application/json"]): Promise<undefined>;
|
|
19929
19929
|
delete(id: string): Promise<undefined>;
|
package/dist/index.js
CHANGED
|
@@ -512,17 +512,17 @@ async function* paginate(fetchPage, itemsKey) {
|
|
|
512
512
|
function createAltcurrencies(client, defaults) {
|
|
513
513
|
return {
|
|
514
514
|
/**
|
|
515
|
-
* Retrieve
|
|
515
|
+
* Retrieve alternative currencies
|
|
516
516
|
*
|
|
517
|
-
* Retrieve all
|
|
517
|
+
* Retrieve all alternative currencies in the location.
|
|
518
518
|
*/
|
|
519
519
|
async list(query) {
|
|
520
520
|
return unwrap(await client.GET("/alt_currencies/v1", { params: { query } }));
|
|
521
521
|
},
|
|
522
522
|
/**
|
|
523
|
-
* Retrieve
|
|
523
|
+
* Retrieve alternative currencies — iterates every item across all pages.
|
|
524
524
|
*
|
|
525
|
-
* Retrieve all
|
|
525
|
+
* Retrieve all alternative currencies in the location.
|
|
526
526
|
*/
|
|
527
527
|
iterate(query) {
|
|
528
528
|
return paginate(
|
|
@@ -530,15 +530,15 @@ function createAltcurrencies(client, defaults) {
|
|
|
530
530
|
"altCurrencies"
|
|
531
531
|
);
|
|
532
532
|
},
|
|
533
|
-
/** Create an
|
|
533
|
+
/** Create an alternative currency */
|
|
534
534
|
async create(body) {
|
|
535
535
|
return unwrapProp(await client.POST("/alt_currencies/v1", { body }), "altCurrency");
|
|
536
536
|
},
|
|
537
|
-
/** Update an
|
|
537
|
+
/** Update an alternative currency */
|
|
538
538
|
async update(id, body) {
|
|
539
539
|
return unwrap(await client.PATCH("/alt_currencies/v1/{id}", { params: { path: { id } }, body }));
|
|
540
540
|
},
|
|
541
|
-
/** Delete an
|
|
541
|
+
/** Delete an alternative currency */
|
|
542
542
|
async delete(id) {
|
|
543
543
|
return unwrap(await client.DELETE("/alt_currencies/v1/{id}", { params: { path: { id } } }));
|
|
544
544
|
}
|