@blimu/types 0.1.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/README.md +51 -0
- package/dist/index.d.mts +52 -0
- package/dist/index.d.ts +52 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @blimu/types
|
|
2
|
+
|
|
3
|
+
TypeScript type definitions for Blimu simple types.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This package provides base type definitions for Blimu's simple types (ResourceType, EntitlementType, PlanType, etc.). These types are augmented by customer configuration via the `blimu codegen` command, which generates union types based on your Blimu configuration.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @blimu/types
|
|
13
|
+
# or
|
|
14
|
+
yarn add @blimu/types
|
|
15
|
+
# or
|
|
16
|
+
pnpm add @blimu/types
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
After running `blimu codegen` in your project, the types in this package will be augmented with union types based on your configuration:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import type { ResourceType, EntitlementType } from '@blimu/types';
|
|
25
|
+
|
|
26
|
+
// After codegen, ResourceType might be:
|
|
27
|
+
// type ResourceType = 'organization' | 'workspace' | 'project';
|
|
28
|
+
|
|
29
|
+
// EntitlementType might be:
|
|
30
|
+
// type EntitlementType = 'organization:create_workspace' | 'workspace:delete';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Types
|
|
34
|
+
|
|
35
|
+
- **ResourceType**: Resource type identifiers
|
|
36
|
+
- **EntitlementType**: Entitlement type identifiers
|
|
37
|
+
- **PlanType**: Plan type identifiers
|
|
38
|
+
- **LimitType**: Resource-based limit type identifiers
|
|
39
|
+
- **UsageLimitType**: Usage-based limit type identifiers
|
|
40
|
+
|
|
41
|
+
## Type Augmentation
|
|
42
|
+
|
|
43
|
+
To augment these types with your configuration:
|
|
44
|
+
|
|
45
|
+
1. Create a Blimu config file (`.blimu/config.mjs` or `.blimu/config.ts`)
|
|
46
|
+
2. Run `blimu codegen`
|
|
47
|
+
3. The generated `.blimu/blimu-types.d.ts` file will augment these types
|
|
48
|
+
|
|
49
|
+
## Learn More
|
|
50
|
+
|
|
51
|
+
Visit [https://blimu.com](https://blimu.com) for documentation and more information.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @blimu/types - TypeScript type definitions for Blimu simple types
|
|
3
|
+
*
|
|
4
|
+
* These types are base definitions that are augmented by customer configuration
|
|
5
|
+
* via the `blimu codegen` command. The augmentation adds union types based on
|
|
6
|
+
* the customer's resource, entitlement, plan, and limit definitions.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import type { ResourceType } from '@blimu/types';
|
|
11
|
+
*
|
|
12
|
+
* // After running `blimu codegen`, ResourceType will be:
|
|
13
|
+
* // type ResourceType = 'organization' | 'workspace' | 'project';
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Resource type identifier
|
|
18
|
+
*
|
|
19
|
+
* This type is augmented by `blimu codegen` to include all resource types
|
|
20
|
+
* defined in your Blimu configuration.
|
|
21
|
+
*/
|
|
22
|
+
type ResourceType = string;
|
|
23
|
+
/**
|
|
24
|
+
* Entitlement type identifier
|
|
25
|
+
*
|
|
26
|
+
* This type is augmented by `blimu codegen` to include all entitlement types
|
|
27
|
+
* defined in your Blimu configuration.
|
|
28
|
+
*/
|
|
29
|
+
type EntitlementType = string;
|
|
30
|
+
/**
|
|
31
|
+
* Plan type identifier
|
|
32
|
+
*
|
|
33
|
+
* This type is augmented by `blimu codegen` to include all plan types
|
|
34
|
+
* defined in your Blimu configuration.
|
|
35
|
+
*/
|
|
36
|
+
type PlanType = string;
|
|
37
|
+
/**
|
|
38
|
+
* Limit type identifier (resource-based limits)
|
|
39
|
+
*
|
|
40
|
+
* This type is augmented by `blimu codegen` to include all resource limit types
|
|
41
|
+
* defined in your Blimu configuration plans.
|
|
42
|
+
*/
|
|
43
|
+
type LimitType = string;
|
|
44
|
+
/**
|
|
45
|
+
* Usage-based limit type identifier
|
|
46
|
+
*
|
|
47
|
+
* This type is augmented by `blimu codegen` to include all usage-based limit types
|
|
48
|
+
* defined in your Blimu configuration plans.
|
|
49
|
+
*/
|
|
50
|
+
type UsageLimitType = string;
|
|
51
|
+
|
|
52
|
+
export type { EntitlementType, LimitType, PlanType, ResourceType, UsageLimitType };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @blimu/types - TypeScript type definitions for Blimu simple types
|
|
3
|
+
*
|
|
4
|
+
* These types are base definitions that are augmented by customer configuration
|
|
5
|
+
* via the `blimu codegen` command. The augmentation adds union types based on
|
|
6
|
+
* the customer's resource, entitlement, plan, and limit definitions.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import type { ResourceType } from '@blimu/types';
|
|
11
|
+
*
|
|
12
|
+
* // After running `blimu codegen`, ResourceType will be:
|
|
13
|
+
* // type ResourceType = 'organization' | 'workspace' | 'project';
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Resource type identifier
|
|
18
|
+
*
|
|
19
|
+
* This type is augmented by `blimu codegen` to include all resource types
|
|
20
|
+
* defined in your Blimu configuration.
|
|
21
|
+
*/
|
|
22
|
+
type ResourceType = string;
|
|
23
|
+
/**
|
|
24
|
+
* Entitlement type identifier
|
|
25
|
+
*
|
|
26
|
+
* This type is augmented by `blimu codegen` to include all entitlement types
|
|
27
|
+
* defined in your Blimu configuration.
|
|
28
|
+
*/
|
|
29
|
+
type EntitlementType = string;
|
|
30
|
+
/**
|
|
31
|
+
* Plan type identifier
|
|
32
|
+
*
|
|
33
|
+
* This type is augmented by `blimu codegen` to include all plan types
|
|
34
|
+
* defined in your Blimu configuration.
|
|
35
|
+
*/
|
|
36
|
+
type PlanType = string;
|
|
37
|
+
/**
|
|
38
|
+
* Limit type identifier (resource-based limits)
|
|
39
|
+
*
|
|
40
|
+
* This type is augmented by `blimu codegen` to include all resource limit types
|
|
41
|
+
* defined in your Blimu configuration plans.
|
|
42
|
+
*/
|
|
43
|
+
type LimitType = string;
|
|
44
|
+
/**
|
|
45
|
+
* Usage-based limit type identifier
|
|
46
|
+
*
|
|
47
|
+
* This type is augmented by `blimu codegen` to include all usage-based limit types
|
|
48
|
+
* defined in your Blimu configuration plans.
|
|
49
|
+
*/
|
|
50
|
+
type UsageLimitType = string;
|
|
51
|
+
|
|
52
|
+
export type { EntitlementType, LimitType, PlanType, ResourceType, UsageLimitType };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/index.ts
|
|
17
|
+
var index_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(index_exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @blimu/types - TypeScript type definitions for Blimu simple types\n *\n * These types are base definitions that are augmented by customer configuration\n * via the `blimu codegen` command. The augmentation adds union types based on\n * the customer's resource, entitlement, plan, and limit definitions.\n *\n * @example\n * ```typescript\n * import type { ResourceType } from '@blimu/types';\n *\n * // After running `blimu codegen`, ResourceType will be:\n * // type ResourceType = 'organization' | 'workspace' | 'project';\n * ```\n */\n\n/**\n * Resource type identifier\n *\n * This type is augmented by `blimu codegen` to include all resource types\n * defined in your Blimu configuration.\n */\nexport type ResourceType = string;\n\n/**\n * Entitlement type identifier\n *\n * This type is augmented by `blimu codegen` to include all entitlement types\n * defined in your Blimu configuration.\n */\nexport type EntitlementType = string;\n\n/**\n * Plan type identifier\n *\n * This type is augmented by `blimu codegen` to include all plan types\n * defined in your Blimu configuration.\n */\nexport type PlanType = string;\n\n/**\n * Limit type identifier (resource-based limits)\n *\n * This type is augmented by `blimu codegen` to include all resource limit types\n * defined in your Blimu configuration plans.\n */\nexport type LimitType = string;\n\n/**\n * Usage-based limit type identifier\n *\n * This type is augmented by `blimu codegen` to include all usage-based limit types\n * defined in your Blimu configuration plans.\n */\nexport type UsageLimitType = string;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@blimu/types",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript type definitions for Blimu simple types",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.mjs",
|
|
14
|
+
"require": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsup",
|
|
19
|
+
"type-check": "tsc --noEmit"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/blimu-dev/blimu-ts"
|
|
24
|
+
},
|
|
25
|
+
"author": "viniciusdacal",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"keywords": [
|
|
28
|
+
"typescript",
|
|
29
|
+
"types",
|
|
30
|
+
"blimu"
|
|
31
|
+
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18.0.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"tsup": "^8.5.1",
|
|
37
|
+
"typescript": "^5.0.0"
|
|
38
|
+
}
|
|
39
|
+
}
|