productcraft 0.0.1

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 ADDED
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ var heimdall = require('@productcraft/heimdall');
4
+ var envoi = require('@productcraft/envoi');
5
+ var rally = require('@productcraft/rally');
6
+ var agora = require('@productcraft/agora');
7
+ var platformAuth = require('@productcraft/platform-auth');
8
+ var core = require('@productcraft/core');
9
+
10
+ // src/index.ts
11
+ var ProductCraft = class {
12
+ heimdall;
13
+ envoi;
14
+ rally;
15
+ agora;
16
+ platformAuth;
17
+ constructor(config = {}) {
18
+ const {
19
+ heimdall: hOverride,
20
+ envoi: eOverride,
21
+ rally: rOverride,
22
+ agora: aOverride,
23
+ platformAuth: pOverride,
24
+ ...shared
25
+ } = config;
26
+ this.heimdall = new heimdall.Heimdall({ ...shared, ...hOverride });
27
+ this.envoi = new envoi.Envoi({ ...shared, ...eOverride });
28
+ this.rally = new rally.Rally({ ...shared, ...rOverride });
29
+ this.agora = new agora.Agora({ ...shared, ...aOverride });
30
+ this.platformAuth = new platformAuth.PlatformAuth({ ...shared, ...pOverride });
31
+ }
32
+ };
33
+
34
+ Object.defineProperty(exports, "Heimdall", {
35
+ enumerable: true,
36
+ get: function () { return heimdall.Heimdall; }
37
+ });
38
+ Object.defineProperty(exports, "Envoi", {
39
+ enumerable: true,
40
+ get: function () { return envoi.Envoi; }
41
+ });
42
+ Object.defineProperty(exports, "Rally", {
43
+ enumerable: true,
44
+ get: function () { return rally.Rally; }
45
+ });
46
+ Object.defineProperty(exports, "Agora", {
47
+ enumerable: true,
48
+ get: function () { return agora.Agora; }
49
+ });
50
+ Object.defineProperty(exports, "PlatformAuth", {
51
+ enumerable: true,
52
+ get: function () { return platformAuth.PlatformAuth; }
53
+ });
54
+ Object.defineProperty(exports, "PC_BASE_URL", {
55
+ enumerable: true,
56
+ get: function () { return core.PC_BASE_URL; }
57
+ });
58
+ exports.ProductCraft = ProductCraft;
59
+ //# sourceMappingURL=index.cjs.map
60
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":["Heimdall","Envoi","Rally","Agora","PlatformAuth"],"mappings":";;;;;;;;;;AAqCO,IAAM,eAAN,MAAmB;AAAA,EACR,QAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAA;AAAA,EAEhB,WAAA,CACE,MAAA,GAMI,EAAC,EACL;AACA,IAAA,MAAM;AAAA,MACJ,QAAA,EAAU,SAAA;AAAA,MACV,KAAA,EAAO,SAAA;AAAA,MACP,KAAA,EAAO,SAAA;AAAA,MACP,KAAA,EAAO,SAAA;AAAA,MACP,YAAA,EAAc,SAAA;AAAA,MACd,GAAG;AAAA,KACL,GAAI,MAAA;AACJ,IAAA,IAAA,CAAK,QAAA,GAAW,IAAIA,iBAAA,CAAS,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AACxD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAIC,WAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAClD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAIC,WAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAClD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAIC,WAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAClD,IAAA,IAAA,CAAK,YAAA,GAAe,IAAIC,yBAAA,CAAa,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAAA,EAClE;AACF","file":"index.cjs","sourcesContent":["/**\n * `productcraft` — single import that gives you every API surface.\n *\n * ```ts\n * import { ProductCraft } from \"productcraft\";\n *\n * const pc = new ProductCraft({\n * auth: { type: \"apiKey\", key: \"pcft_live_...\" },\n * });\n *\n * const { data, error } = await pc.envoi.client.POST(\n * \"/v1/mailboxes/{mailboxId}/messages/send\",\n * { params: { path: { mailboxId: \"...\" } }, body: { ... } }\n * );\n * ```\n *\n * If you only need one product, install its package directly:\n * `npm i @productcraft/heimdall` (and skip this umbrella).\n */\n\nimport { Heimdall } from \"@productcraft/heimdall\";\nimport { Envoi } from \"@productcraft/envoi\";\nimport { Rally } from \"@productcraft/rally\";\nimport { Agora } from \"@productcraft/agora\";\nimport { PlatformAuth } from \"@productcraft/platform-auth\";\nimport type { PCClientConfig } from \"@productcraft/core\";\n\nexport { Heimdall, Envoi, Rally, Agora, PlatformAuth };\nexport { PC_BASE_URL, type PCAuth, type PCClientConfig } from \"@productcraft/core\";\n\n/**\n * The umbrella class — instantiates one of each surface client, all\n * sharing the same auth + fetch + (optional) baseUrl override config.\n *\n * Surface-specific overrides are also possible:\n * `new ProductCraft({ auth, heimdall: { baseUrl: \"...\" } })`.\n */\nexport class ProductCraft {\n public readonly heimdall: Heimdall;\n public readonly envoi: Envoi;\n public readonly rally: Rally;\n public readonly agora: Agora;\n public readonly platformAuth: PlatformAuth;\n\n constructor(\n config: PCClientConfig & {\n heimdall?: PCClientConfig;\n envoi?: PCClientConfig;\n rally?: PCClientConfig;\n agora?: PCClientConfig;\n platformAuth?: PCClientConfig;\n } = {},\n ) {\n const {\n heimdall: hOverride,\n envoi: eOverride,\n rally: rOverride,\n agora: aOverride,\n platformAuth: pOverride,\n ...shared\n } = config;\n this.heimdall = new Heimdall({ ...shared, ...hOverride });\n this.envoi = new Envoi({ ...shared, ...eOverride });\n this.rally = new Rally({ ...shared, ...rOverride });\n this.agora = new Agora({ ...shared, ...aOverride });\n this.platformAuth = new PlatformAuth({ ...shared, ...pOverride });\n }\n}\n"]}
@@ -0,0 +1,56 @@
1
+ import { Heimdall } from '@productcraft/heimdall';
2
+ export { Heimdall } from '@productcraft/heimdall';
3
+ import { Envoi } from '@productcraft/envoi';
4
+ export { Envoi } from '@productcraft/envoi';
5
+ import { Rally } from '@productcraft/rally';
6
+ export { Rally } from '@productcraft/rally';
7
+ import { Agora } from '@productcraft/agora';
8
+ export { Agora } from '@productcraft/agora';
9
+ import { PlatformAuth } from '@productcraft/platform-auth';
10
+ export { PlatformAuth } from '@productcraft/platform-auth';
11
+ import { PCClientConfig } from '@productcraft/core';
12
+ export { PCAuth, PCClientConfig, PC_BASE_URL } from '@productcraft/core';
13
+
14
+ /**
15
+ * `productcraft` — single import that gives you every API surface.
16
+ *
17
+ * ```ts
18
+ * import { ProductCraft } from "productcraft";
19
+ *
20
+ * const pc = new ProductCraft({
21
+ * auth: { type: "apiKey", key: "pcft_live_..." },
22
+ * });
23
+ *
24
+ * const { data, error } = await pc.envoi.client.POST(
25
+ * "/v1/mailboxes/{mailboxId}/messages/send",
26
+ * { params: { path: { mailboxId: "..." } }, body: { ... } }
27
+ * );
28
+ * ```
29
+ *
30
+ * If you only need one product, install its package directly:
31
+ * `npm i @productcraft/heimdall` (and skip this umbrella).
32
+ */
33
+
34
+ /**
35
+ * The umbrella class — instantiates one of each surface client, all
36
+ * sharing the same auth + fetch + (optional) baseUrl override config.
37
+ *
38
+ * Surface-specific overrides are also possible:
39
+ * `new ProductCraft({ auth, heimdall: { baseUrl: "..." } })`.
40
+ */
41
+ declare class ProductCraft {
42
+ readonly heimdall: Heimdall;
43
+ readonly envoi: Envoi;
44
+ readonly rally: Rally;
45
+ readonly agora: Agora;
46
+ readonly platformAuth: PlatformAuth;
47
+ constructor(config?: PCClientConfig & {
48
+ heimdall?: PCClientConfig;
49
+ envoi?: PCClientConfig;
50
+ rally?: PCClientConfig;
51
+ agora?: PCClientConfig;
52
+ platformAuth?: PCClientConfig;
53
+ });
54
+ }
55
+
56
+ export { ProductCraft };
@@ -0,0 +1,56 @@
1
+ import { Heimdall } from '@productcraft/heimdall';
2
+ export { Heimdall } from '@productcraft/heimdall';
3
+ import { Envoi } from '@productcraft/envoi';
4
+ export { Envoi } from '@productcraft/envoi';
5
+ import { Rally } from '@productcraft/rally';
6
+ export { Rally } from '@productcraft/rally';
7
+ import { Agora } from '@productcraft/agora';
8
+ export { Agora } from '@productcraft/agora';
9
+ import { PlatformAuth } from '@productcraft/platform-auth';
10
+ export { PlatformAuth } from '@productcraft/platform-auth';
11
+ import { PCClientConfig } from '@productcraft/core';
12
+ export { PCAuth, PCClientConfig, PC_BASE_URL } from '@productcraft/core';
13
+
14
+ /**
15
+ * `productcraft` — single import that gives you every API surface.
16
+ *
17
+ * ```ts
18
+ * import { ProductCraft } from "productcraft";
19
+ *
20
+ * const pc = new ProductCraft({
21
+ * auth: { type: "apiKey", key: "pcft_live_..." },
22
+ * });
23
+ *
24
+ * const { data, error } = await pc.envoi.client.POST(
25
+ * "/v1/mailboxes/{mailboxId}/messages/send",
26
+ * { params: { path: { mailboxId: "..." } }, body: { ... } }
27
+ * );
28
+ * ```
29
+ *
30
+ * If you only need one product, install its package directly:
31
+ * `npm i @productcraft/heimdall` (and skip this umbrella).
32
+ */
33
+
34
+ /**
35
+ * The umbrella class — instantiates one of each surface client, all
36
+ * sharing the same auth + fetch + (optional) baseUrl override config.
37
+ *
38
+ * Surface-specific overrides are also possible:
39
+ * `new ProductCraft({ auth, heimdall: { baseUrl: "..." } })`.
40
+ */
41
+ declare class ProductCraft {
42
+ readonly heimdall: Heimdall;
43
+ readonly envoi: Envoi;
44
+ readonly rally: Rally;
45
+ readonly agora: Agora;
46
+ readonly platformAuth: PlatformAuth;
47
+ constructor(config?: PCClientConfig & {
48
+ heimdall?: PCClientConfig;
49
+ envoi?: PCClientConfig;
50
+ rally?: PCClientConfig;
51
+ agora?: PCClientConfig;
52
+ platformAuth?: PCClientConfig;
53
+ });
54
+ }
55
+
56
+ export { ProductCraft };
package/dist/index.js ADDED
@@ -0,0 +1,39 @@
1
+ import { Heimdall } from '@productcraft/heimdall';
2
+ export { Heimdall } from '@productcraft/heimdall';
3
+ import { Envoi } from '@productcraft/envoi';
4
+ export { Envoi } from '@productcraft/envoi';
5
+ import { Rally } from '@productcraft/rally';
6
+ export { Rally } from '@productcraft/rally';
7
+ import { Agora } from '@productcraft/agora';
8
+ export { Agora } from '@productcraft/agora';
9
+ import { PlatformAuth } from '@productcraft/platform-auth';
10
+ export { PlatformAuth } from '@productcraft/platform-auth';
11
+ export { PC_BASE_URL } from '@productcraft/core';
12
+
13
+ // src/index.ts
14
+ var ProductCraft = class {
15
+ heimdall;
16
+ envoi;
17
+ rally;
18
+ agora;
19
+ platformAuth;
20
+ constructor(config = {}) {
21
+ const {
22
+ heimdall: hOverride,
23
+ envoi: eOverride,
24
+ rally: rOverride,
25
+ agora: aOverride,
26
+ platformAuth: pOverride,
27
+ ...shared
28
+ } = config;
29
+ this.heimdall = new Heimdall({ ...shared, ...hOverride });
30
+ this.envoi = new Envoi({ ...shared, ...eOverride });
31
+ this.rally = new Rally({ ...shared, ...rOverride });
32
+ this.agora = new Agora({ ...shared, ...aOverride });
33
+ this.platformAuth = new PlatformAuth({ ...shared, ...pOverride });
34
+ }
35
+ };
36
+
37
+ export { ProductCraft };
38
+ //# sourceMappingURL=index.js.map
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAqCO,IAAM,eAAN,MAAmB;AAAA,EACR,QAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAA;AAAA,EAEhB,WAAA,CACE,MAAA,GAMI,EAAC,EACL;AACA,IAAA,MAAM;AAAA,MACJ,QAAA,EAAU,SAAA;AAAA,MACV,KAAA,EAAO,SAAA;AAAA,MACP,KAAA,EAAO,SAAA;AAAA,MACP,KAAA,EAAO,SAAA;AAAA,MACP,YAAA,EAAc,SAAA;AAAA,MACd,GAAG;AAAA,KACL,GAAI,MAAA;AACJ,IAAA,IAAA,CAAK,QAAA,GAAW,IAAI,QAAA,CAAS,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AACxD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAI,KAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAClD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAI,KAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAClD,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAI,KAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAClD,IAAA,IAAA,CAAK,YAAA,GAAe,IAAI,YAAA,CAAa,EAAE,GAAG,MAAA,EAAQ,GAAG,WAAW,CAAA;AAAA,EAClE;AACF","file":"index.js","sourcesContent":["/**\n * `productcraft` — single import that gives you every API surface.\n *\n * ```ts\n * import { ProductCraft } from \"productcraft\";\n *\n * const pc = new ProductCraft({\n * auth: { type: \"apiKey\", key: \"pcft_live_...\" },\n * });\n *\n * const { data, error } = await pc.envoi.client.POST(\n * \"/v1/mailboxes/{mailboxId}/messages/send\",\n * { params: { path: { mailboxId: \"...\" } }, body: { ... } }\n * );\n * ```\n *\n * If you only need one product, install its package directly:\n * `npm i @productcraft/heimdall` (and skip this umbrella).\n */\n\nimport { Heimdall } from \"@productcraft/heimdall\";\nimport { Envoi } from \"@productcraft/envoi\";\nimport { Rally } from \"@productcraft/rally\";\nimport { Agora } from \"@productcraft/agora\";\nimport { PlatformAuth } from \"@productcraft/platform-auth\";\nimport type { PCClientConfig } from \"@productcraft/core\";\n\nexport { Heimdall, Envoi, Rally, Agora, PlatformAuth };\nexport { PC_BASE_URL, type PCAuth, type PCClientConfig } from \"@productcraft/core\";\n\n/**\n * The umbrella class — instantiates one of each surface client, all\n * sharing the same auth + fetch + (optional) baseUrl override config.\n *\n * Surface-specific overrides are also possible:\n * `new ProductCraft({ auth, heimdall: { baseUrl: \"...\" } })`.\n */\nexport class ProductCraft {\n public readonly heimdall: Heimdall;\n public readonly envoi: Envoi;\n public readonly rally: Rally;\n public readonly agora: Agora;\n public readonly platformAuth: PlatformAuth;\n\n constructor(\n config: PCClientConfig & {\n heimdall?: PCClientConfig;\n envoi?: PCClientConfig;\n rally?: PCClientConfig;\n agora?: PCClientConfig;\n platformAuth?: PCClientConfig;\n } = {},\n ) {\n const {\n heimdall: hOverride,\n envoi: eOverride,\n rally: rOverride,\n agora: aOverride,\n platformAuth: pOverride,\n ...shared\n } = config;\n this.heimdall = new Heimdall({ ...shared, ...hOverride });\n this.envoi = new Envoi({ ...shared, ...eOverride });\n this.rally = new Rally({ ...shared, ...rOverride });\n this.agora = new Agora({ ...shared, ...aOverride });\n this.platformAuth = new PlatformAuth({ ...shared, ...pOverride });\n }\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "productcraft",
3
+ "version": "0.0.1",
4
+ "description": "All-in-one Node.js / TypeScript SDK for the ProductCraft platform \u2014 Heimdall, Envoi, Rally, Agora, and Platform-Auth from a single import. Install per-product packages (`@productcraft/heimdall`, ...) if you only need one.",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist/**",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "engines": {
22
+ "node": ">=18"
23
+ },
24
+ "scripts": {
25
+ "build": "tsup",
26
+ "test": "vitest run"
27
+ },
28
+ "keywords": [
29
+ "productcraft",
30
+ "sdk",
31
+ "heimdall",
32
+ "envoi",
33
+ "rally",
34
+ "agora",
35
+ "auth",
36
+ "email",
37
+ "waitlist",
38
+ "openapi"
39
+ ],
40
+ "author": "ProductCraft",
41
+ "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/clauderanelagh/productcraft-node.git",
45
+ "directory": "packages/umbrella"
46
+ },
47
+ "homepage": "https://github.com/clauderanelagh/productcraft-node",
48
+ "publishConfig": {
49
+ "access": "public"
50
+ },
51
+ "dependencies": {
52
+ "@productcraft/agora": "workspace:^",
53
+ "@productcraft/core": "workspace:^",
54
+ "@productcraft/envoi": "workspace:^",
55
+ "@productcraft/heimdall": "workspace:^",
56
+ "@productcraft/platform-auth": "workspace:^",
57
+ "@productcraft/rally": "workspace:^"
58
+ }
59
+ }