@sudobility/types 1.9.36 → 1.9.37
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/types/index.cjs +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/subscription/index.cjs +19 -0
- package/dist/types/subscription/index.d.ts +2 -0
- package/dist/types/subscription/index.d.ts.map +1 -0
- package/dist/types/subscription/index.js +19 -0
- package/dist/types/subscription/index.js.map +1 -0
- package/dist/types/subscription/rate-limits.cjs +20 -0
- package/dist/types/subscription/rate-limits.d.ts +94 -0
- package/dist/types/subscription/rate-limits.d.ts.map +1 -0
- package/dist/types/subscription/rate-limits.js +20 -0
- package/dist/types/subscription/rate-limits.js.map +1 -0
- package/package.json +1 -1
package/dist/types/index.cjs
CHANGED
|
@@ -24,4 +24,6 @@ __exportStar(require("./blockchain"), exports);
|
|
|
24
24
|
__exportStar(require("./config"), exports);
|
|
25
25
|
// Infrastructure types
|
|
26
26
|
__exportStar(require("./infrastructure"), exports);
|
|
27
|
+
// Subscription types (rate limits, etc.)
|
|
28
|
+
__exportStar(require("./subscription"), exports);
|
|
27
29
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAGzB,cAAc,YAAY,CAAC;AAG3B,cAAc,cAAc,CAAC;AAG7B,cAAc,UAAU,CAAC;AAGzB,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AACA,cAAc,UAAU,CAAC;AAGzB,cAAc,YAAY,CAAC;AAG3B,cAAc,cAAc,CAAC;AAG7B,cAAc,UAAU,CAAC;AAGzB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,gBAAgB,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -24,4 +24,6 @@ __exportStar(require("./blockchain"), exports);
|
|
|
24
24
|
__exportStar(require("./config"), exports);
|
|
25
25
|
// Infrastructure types
|
|
26
26
|
__exportStar(require("./infrastructure"), exports);
|
|
27
|
+
// Subscription types (rate limits, etc.)
|
|
28
|
+
__exportStar(require("./subscription"), exports);
|
|
27
29
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,2CAAyB;AAEzB,wBAAwB;AACxB,6CAA2B;AAE3B,8BAA8B;AAC9B,+CAA6B;AAE7B,4BAA4B;AAC5B,2CAAyB;AAEzB,uBAAuB;AACvB,mDAAiC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,2CAAyB;AAEzB,wBAAwB;AACxB,6CAA2B;AAE3B,8BAA8B;AAC9B,+CAA6B;AAE7B,4BAA4B;AAC5B,2CAAyB;AAEzB,uBAAuB;AACvB,mDAAiC;AAEjC,yCAAyC;AACzC,iDAA+B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Rate limit types
|
|
18
|
+
__exportStar(require("./rate-limits"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/subscription/index.ts"],"names":[],"mappings":"AACA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Rate limit types
|
|
18
|
+
__exportStar(require("./rate-limits"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/subscription/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mBAAmB;AACnB,gDAA8B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Rate Limit Type Definitions
|
|
4
|
+
* @description Types for rate limiting endpoints across sudojo_api, shapeshyft_api, and whisperly_api
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.RateLimitPeriodType = void 0;
|
|
8
|
+
// ========================================
|
|
9
|
+
// RATE LIMIT HISTORY TYPES
|
|
10
|
+
// ========================================
|
|
11
|
+
/**
|
|
12
|
+
* Valid period types for rate limit history.
|
|
13
|
+
*/
|
|
14
|
+
var RateLimitPeriodType;
|
|
15
|
+
(function (RateLimitPeriodType) {
|
|
16
|
+
RateLimitPeriodType["HOUR"] = "hour";
|
|
17
|
+
RateLimitPeriodType["DAY"] = "day";
|
|
18
|
+
RateLimitPeriodType["MONTH"] = "month";
|
|
19
|
+
})(RateLimitPeriodType || (exports.RateLimitPeriodType = RateLimitPeriodType = {}));
|
|
20
|
+
//# sourceMappingURL=rate-limits.js.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Rate Limit Type Definitions
|
|
3
|
+
* @description Types for rate limiting endpoints across sudojo_api, shapeshyft_api, and whisperly_api
|
|
4
|
+
*/
|
|
5
|
+
import type { BaseResponse } from "../common";
|
|
6
|
+
/**
|
|
7
|
+
* Rate limits for a single time period.
|
|
8
|
+
* null/undefined means unlimited for that period.
|
|
9
|
+
*/
|
|
10
|
+
export interface RateLimits {
|
|
11
|
+
/** Requests allowed per hour. null = unlimited */
|
|
12
|
+
hourly: number | null;
|
|
13
|
+
/** Requests allowed per day. null = unlimited */
|
|
14
|
+
daily: number | null;
|
|
15
|
+
/** Requests allowed per month. null = unlimited */
|
|
16
|
+
monthly: number | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Rate limit configuration for a single entitlement tier.
|
|
20
|
+
*/
|
|
21
|
+
export interface RateLimitTier {
|
|
22
|
+
/** Entitlement name (e.g., "none", "pro", "enterprise") */
|
|
23
|
+
entitlement: string;
|
|
24
|
+
/** Display name for the tier */
|
|
25
|
+
displayName: string;
|
|
26
|
+
/** Rate limits for this tier */
|
|
27
|
+
limits: RateLimits;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Response data for GET /ratelimits endpoint.
|
|
31
|
+
* Returns all rate limit configurations for all entitlement tiers.
|
|
32
|
+
*/
|
|
33
|
+
export interface RateLimitsConfigData {
|
|
34
|
+
/** All available rate limit tiers */
|
|
35
|
+
tiers: RateLimitTier[];
|
|
36
|
+
/** Current user's active entitlement */
|
|
37
|
+
currentEntitlement: string;
|
|
38
|
+
/** Current user's rate limits */
|
|
39
|
+
currentLimits: RateLimits;
|
|
40
|
+
/** Current usage counts */
|
|
41
|
+
currentUsage: RateLimitUsage;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Current usage counts for rate limiting.
|
|
45
|
+
*/
|
|
46
|
+
export interface RateLimitUsage {
|
|
47
|
+
/** Requests used this hour */
|
|
48
|
+
hourly: number;
|
|
49
|
+
/** Requests used today */
|
|
50
|
+
daily: number;
|
|
51
|
+
/** Requests used this month */
|
|
52
|
+
monthly: number;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* API response for GET /ratelimits endpoint.
|
|
56
|
+
*/
|
|
57
|
+
export type RateLimitsConfigResponse = BaseResponse<RateLimitsConfigData>;
|
|
58
|
+
/**
|
|
59
|
+
* Valid period types for rate limit history.
|
|
60
|
+
*/
|
|
61
|
+
export declare enum RateLimitPeriodType {
|
|
62
|
+
HOUR = "hour",
|
|
63
|
+
DAY = "day",
|
|
64
|
+
MONTH = "month"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A single history entry for a time period.
|
|
68
|
+
*/
|
|
69
|
+
export interface RateLimitHistoryEntry {
|
|
70
|
+
/** Start of the time period (ISO 8601 string) */
|
|
71
|
+
periodStart: string;
|
|
72
|
+
/** End of the time period (ISO 8601 string, exclusive) */
|
|
73
|
+
periodEnd: string;
|
|
74
|
+
/** Number of requests in this period */
|
|
75
|
+
requestCount: number;
|
|
76
|
+
/** Rate limit for this period (null = unlimited) */
|
|
77
|
+
limit: number | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Response data for GET /ratelimits/history/{periodType} endpoint.
|
|
81
|
+
*/
|
|
82
|
+
export interface RateLimitHistoryData {
|
|
83
|
+
/** Type of period: 'hour', 'day', or 'month' */
|
|
84
|
+
periodType: RateLimitPeriodType;
|
|
85
|
+
/** Historical entries, sorted by periodStart descending (most recent first) */
|
|
86
|
+
entries: RateLimitHistoryEntry[];
|
|
87
|
+
/** Total number of entries available */
|
|
88
|
+
totalEntries: number;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* API response for GET /ratelimits/history/{periodType} endpoint.
|
|
92
|
+
*/
|
|
93
|
+
export type RateLimitHistoryResponse = BaseResponse<RateLimitHistoryData>;
|
|
94
|
+
//# sourceMappingURL=rate-limits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limits.d.ts","sourceRoot":"","sources":["../../../src/types/subscription/rate-limits.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAM9C;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mDAAmD;IACnD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,2DAA2D;IA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
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview Rate Limit Type Definitions
|
|
4
|
+
* @description Types for rate limiting endpoints across sudojo_api, shapeshyft_api, and whisperly_api
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.RateLimitPeriodType = void 0;
|
|
8
|
+
// ========================================
|
|
9
|
+
// RATE LIMIT HISTORY TYPES
|
|
10
|
+
// ========================================
|
|
11
|
+
/**
|
|
12
|
+
* Valid period types for rate limit history.
|
|
13
|
+
*/
|
|
14
|
+
var RateLimitPeriodType;
|
|
15
|
+
(function (RateLimitPeriodType) {
|
|
16
|
+
RateLimitPeriodType["HOUR"] = "hour";
|
|
17
|
+
RateLimitPeriodType["DAY"] = "day";
|
|
18
|
+
RateLimitPeriodType["MONTH"] = "month";
|
|
19
|
+
})(RateLimitPeriodType || (exports.RateLimitPeriodType = RateLimitPeriodType = {}));
|
|
20
|
+
//# sourceMappingURL=rate-limits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rate-limits.js","sourceRoot":"","sources":["../../../src/types/subscription/rate-limits.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAiEH,2CAA2C;AAC3C,2BAA2B;AAC3B,2CAA2C;AAE3C;;GAEG;AACH,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,kCAAW,CAAA;IACX,sCAAe,CAAA;AACjB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/types",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.37",
|
|
4
4
|
"description": "Comprehensive TypeScript types, interfaces, and utilities for Web3 email applications - optimized for AI-assisted development",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|