@driveflux/api-swr 4.0.66 → 4.0.68
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/api-legacy/index.js +1 -18
- package/dist/api-models.d.ts +1 -0
- package/dist/api-models.d.ts.map +1 -1
- package/dist/api-models.js +2 -1
- package/package.json +3 -3
package/dist/api-legacy/index.js
CHANGED
|
@@ -345,24 +345,7 @@ export var useApiWithAuth = function(key, config) {
|
|
|
345
345
|
accessToken
|
|
346
346
|
] : null, fetchWithAuth, config);
|
|
347
347
|
return _object_spread_props(_object_spread({}, result), {
|
|
348
|
-
revalidate:
|
|
349
|
-
return _async_to_generator(function() {
|
|
350
|
-
return _ts_generator(this, function(_state) {
|
|
351
|
-
switch(_state.label){
|
|
352
|
-
case 0:
|
|
353
|
-
return [
|
|
354
|
-
4,
|
|
355
|
-
result.mutate()
|
|
356
|
-
];
|
|
357
|
-
case 1:
|
|
358
|
-
return [
|
|
359
|
-
2,
|
|
360
|
-
!!_state.sent()
|
|
361
|
-
];
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
})();
|
|
365
|
-
}
|
|
348
|
+
revalidate: result.mutate
|
|
366
349
|
});
|
|
367
350
|
};
|
|
368
351
|
export var usePaginationApiWithAuth = function(key, config) {
|
package/dist/api-models.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare const API_MODELS_URLS: {
|
|
|
11
11
|
readonly Cycle: "/api/cycles";
|
|
12
12
|
readonly Invoice: "/api/invoices";
|
|
13
13
|
readonly SubscriptionReservation: "/api/reservations";
|
|
14
|
+
readonly SubscriptionContract: "/api/subscription-contracts";
|
|
14
15
|
};
|
|
15
16
|
/**
|
|
16
17
|
* This helps IDEs autocomplete without restricting the type of the model argument which can be the api itself
|
package/dist/api-models.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-models.d.ts","sourceRoot":"","sources":["../src/api-models.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG,MAAM,OAAO,eAAe,CAAA;AACnD,KAAK,SAAS,GAAG,OAAO,eAAe,CAAA;AAEvC,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"api-models.d.ts","sourceRoot":"","sources":["../src/api-models.ts"],"names":[],"mappings":"AAOA,KAAK,eAAe,GAAG,MAAM,OAAO,eAAe,CAAA;AACnD,KAAK,SAAS,GAAG,OAAO,eAAe,CAAA;AAEvC,eAAO,MAAM,eAAe;;;;;;;;;;;;CAYQ,CAAA;AAEpC;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAA;AAC5E,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA"}
|
package/dist/api-models.js
CHANGED
|
@@ -9,7 +9,8 @@ export var API_MODELS_URLS = {
|
|
|
9
9
|
Subscription: '/api/subscriptions',
|
|
10
10
|
Cycle: '/api/cycles',
|
|
11
11
|
Invoice: '/api/invoices',
|
|
12
|
-
SubscriptionReservation: '/api/reservations'
|
|
12
|
+
SubscriptionReservation: '/api/reservations',
|
|
13
|
+
SubscriptionContract: '/api/subscription-contracts'
|
|
13
14
|
};
|
|
14
15
|
export function getApiUrl(model) {
|
|
15
16
|
if (model.startsWith('/api') || model.startsWith("".concat(config.apiUrl))) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driveflux/api-swr",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.68",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@driveflux/auth": "4.0.
|
|
19
|
+
"@driveflux/auth": "4.0.68",
|
|
20
20
|
"@driveflux/config": "3.0.9",
|
|
21
|
-
"@driveflux/db": "4.0.
|
|
21
|
+
"@driveflux/db": "4.0.45-develop.1",
|
|
22
22
|
"@driveflux/fetch": "8.0.1",
|
|
23
23
|
"@driveflux/problem": "6.0.1",
|
|
24
24
|
"@driveflux/result": "6.0.1",
|