productcraft 0.1.0 → 0.2.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 +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +11 -9
package/dist/index.cjs
CHANGED
|
@@ -5,6 +5,7 @@ var mail = require('@productcraft/mail');
|
|
|
5
5
|
var waitlist = require('@productcraft/waitlist');
|
|
6
6
|
var social = require('@productcraft/social');
|
|
7
7
|
var platformAuth = require('@productcraft/platform-auth');
|
|
8
|
+
var trawl = require('@productcraft/trawl');
|
|
8
9
|
var core = require('@productcraft/core');
|
|
9
10
|
|
|
10
11
|
// src/index.ts
|
|
@@ -14,6 +15,7 @@ var ProductCraft = class {
|
|
|
14
15
|
waitlist;
|
|
15
16
|
social;
|
|
16
17
|
platformAuth;
|
|
18
|
+
trawl;
|
|
17
19
|
constructor(config = {}) {
|
|
18
20
|
const { overrides, ...shared } = config;
|
|
19
21
|
this.auth = new auth.Auth({ ...shared, ...overrides?.auth });
|
|
@@ -21,6 +23,7 @@ var ProductCraft = class {
|
|
|
21
23
|
this.waitlist = new waitlist.Waitlist({ ...shared, ...overrides?.waitlist });
|
|
22
24
|
this.social = new social.Social({ ...shared, ...overrides?.social });
|
|
23
25
|
this.platformAuth = new platformAuth.PlatformAuth({ ...shared, ...overrides?.platformAuth });
|
|
26
|
+
this.trawl = new trawl.Trawl({ ...shared, ...overrides?.trawl });
|
|
24
27
|
}
|
|
25
28
|
};
|
|
26
29
|
|
|
@@ -44,6 +47,10 @@ Object.defineProperty(exports, "PlatformAuth", {
|
|
|
44
47
|
enumerable: true,
|
|
45
48
|
get: function () { return platformAuth.PlatformAuth; }
|
|
46
49
|
});
|
|
50
|
+
Object.defineProperty(exports, "Trawl", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function () { return trawl.Trawl; }
|
|
53
|
+
});
|
|
47
54
|
Object.defineProperty(exports, "PC_BASE_URL", {
|
|
48
55
|
enumerable: true,
|
|
49
56
|
get: function () { return core.PC_BASE_URL; }
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["Auth","Mail","Waitlist","Social","PlatformAuth"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["Auth","Mail","Waitlist","Social","PlatformAuth","Trawl"],"mappings":";;;;;;;;;;;AAoDO,IAAM,eAAN,MAAmB;AAAA,EACR,IAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,KAAA;AAAA,EAEhB,WAAA,CACE,MAAA,GAAiE,EAAC,EAClE;AACA,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,MAAA,EAAO,GAAI,MAAA;AACjC,IAAA,IAAA,CAAK,IAAA,GAAO,IAAIA,SAAA,CAAK,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,IAAA,EAAM,CAAA;AACtD,IAAA,IAAA,CAAK,IAAA,GAAO,IAAIC,SAAA,CAAK,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,IAAA,EAAM,CAAA;AACtD,IAAA,IAAA,CAAK,QAAA,GAAW,IAAIC,iBAAA,CAAS,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,QAAA,EAAU,CAAA;AAClE,IAAA,IAAA,CAAK,MAAA,GAAS,IAAIC,aAAA,CAAO,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,MAAA,EAAQ,CAAA;AAC5D,IAAA,IAAA,CAAK,YAAA,GAAe,IAAIC,yBAAA,CAAa,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,YAAA,EAAc,CAAA;AAC9E,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAIC,WAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,KAAA,EAAO,CAAA;AAAA,EAC3D;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.mail.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/auth` (and skip this umbrella).\n */\n\nimport { Auth } from \"@productcraft/auth\";\nimport { Mail } from \"@productcraft/mail\";\nimport { Waitlist } from \"@productcraft/waitlist\";\nimport { Social } from \"@productcraft/social\";\nimport { PlatformAuth } from \"@productcraft/platform-auth\";\nimport { Trawl } from \"@productcraft/trawl\";\nimport type { PCClientConfig } from \"@productcraft/core\";\n\nexport { Auth, Mail, Waitlist, Social, PlatformAuth, Trawl };\nexport { PC_BASE_URL, type PCAuth, type PCClientConfig } from \"@productcraft/core\";\n\n/**\n * Per-surface config overrides. Nested under `overrides` (rather than\n * flat keys) because the Auth surface's natural key — `auth` — would\n * collide with the shared `auth` credential field on `PCClientConfig`.\n */\nexport interface ProductCraftOverrides {\n auth?: PCClientConfig;\n mail?: PCClientConfig;\n waitlist?: PCClientConfig;\n social?: PCClientConfig;\n platformAuth?: PCClientConfig;\n trawl?: PCClientConfig;\n}\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, overrides: { mail: { baseUrl: \"...\" } } })`.\n */\nexport class ProductCraft {\n public readonly auth: Auth;\n public readonly mail: Mail;\n public readonly waitlist: Waitlist;\n public readonly social: Social;\n public readonly platformAuth: PlatformAuth;\n public readonly trawl: Trawl;\n\n constructor(\n config: PCClientConfig & { overrides?: ProductCraftOverrides } = {},\n ) {\n const { overrides, ...shared } = config;\n this.auth = new Auth({ ...shared, ...overrides?.auth });\n this.mail = new Mail({ ...shared, ...overrides?.mail });\n this.waitlist = new Waitlist({ ...shared, ...overrides?.waitlist });\n this.social = new Social({ ...shared, ...overrides?.social });\n this.platformAuth = new PlatformAuth({ ...shared, ...overrides?.platformAuth });\n this.trawl = new Trawl({ ...shared, ...overrides?.trawl });\n }\n}\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -8,6 +8,8 @@ import { Social } from '@productcraft/social';
|
|
|
8
8
|
export { Social } from '@productcraft/social';
|
|
9
9
|
import { PlatformAuth } from '@productcraft/platform-auth';
|
|
10
10
|
export { PlatformAuth } from '@productcraft/platform-auth';
|
|
11
|
+
import { Trawl } from '@productcraft/trawl';
|
|
12
|
+
export { Trawl } from '@productcraft/trawl';
|
|
11
13
|
import { PCClientConfig } from '@productcraft/core';
|
|
12
14
|
export { PCAuth, PCClientConfig, PC_BASE_URL } from '@productcraft/core';
|
|
13
15
|
|
|
@@ -42,6 +44,7 @@ interface ProductCraftOverrides {
|
|
|
42
44
|
waitlist?: PCClientConfig;
|
|
43
45
|
social?: PCClientConfig;
|
|
44
46
|
platformAuth?: PCClientConfig;
|
|
47
|
+
trawl?: PCClientConfig;
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* The umbrella class — instantiates one of each surface client, all
|
|
@@ -56,6 +59,7 @@ declare class ProductCraft {
|
|
|
56
59
|
readonly waitlist: Waitlist;
|
|
57
60
|
readonly social: Social;
|
|
58
61
|
readonly platformAuth: PlatformAuth;
|
|
62
|
+
readonly trawl: Trawl;
|
|
59
63
|
constructor(config?: PCClientConfig & {
|
|
60
64
|
overrides?: ProductCraftOverrides;
|
|
61
65
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { Social } from '@productcraft/social';
|
|
|
8
8
|
export { Social } from '@productcraft/social';
|
|
9
9
|
import { PlatformAuth } from '@productcraft/platform-auth';
|
|
10
10
|
export { PlatformAuth } from '@productcraft/platform-auth';
|
|
11
|
+
import { Trawl } from '@productcraft/trawl';
|
|
12
|
+
export { Trawl } from '@productcraft/trawl';
|
|
11
13
|
import { PCClientConfig } from '@productcraft/core';
|
|
12
14
|
export { PCAuth, PCClientConfig, PC_BASE_URL } from '@productcraft/core';
|
|
13
15
|
|
|
@@ -42,6 +44,7 @@ interface ProductCraftOverrides {
|
|
|
42
44
|
waitlist?: PCClientConfig;
|
|
43
45
|
social?: PCClientConfig;
|
|
44
46
|
platformAuth?: PCClientConfig;
|
|
47
|
+
trawl?: PCClientConfig;
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* The umbrella class — instantiates one of each surface client, all
|
|
@@ -56,6 +59,7 @@ declare class ProductCraft {
|
|
|
56
59
|
readonly waitlist: Waitlist;
|
|
57
60
|
readonly social: Social;
|
|
58
61
|
readonly platformAuth: PlatformAuth;
|
|
62
|
+
readonly trawl: Trawl;
|
|
59
63
|
constructor(config?: PCClientConfig & {
|
|
60
64
|
overrides?: ProductCraftOverrides;
|
|
61
65
|
});
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,8 @@ import { Social } from '@productcraft/social';
|
|
|
8
8
|
export { Social } from '@productcraft/social';
|
|
9
9
|
import { PlatformAuth } from '@productcraft/platform-auth';
|
|
10
10
|
export { PlatformAuth } from '@productcraft/platform-auth';
|
|
11
|
+
import { Trawl } from '@productcraft/trawl';
|
|
12
|
+
export { Trawl } from '@productcraft/trawl';
|
|
11
13
|
export { PC_BASE_URL } from '@productcraft/core';
|
|
12
14
|
|
|
13
15
|
// src/index.ts
|
|
@@ -17,6 +19,7 @@ var ProductCraft = class {
|
|
|
17
19
|
waitlist;
|
|
18
20
|
social;
|
|
19
21
|
platformAuth;
|
|
22
|
+
trawl;
|
|
20
23
|
constructor(config = {}) {
|
|
21
24
|
const { overrides, ...shared } = config;
|
|
22
25
|
this.auth = new Auth({ ...shared, ...overrides?.auth });
|
|
@@ -24,6 +27,7 @@ var ProductCraft = class {
|
|
|
24
27
|
this.waitlist = new Waitlist({ ...shared, ...overrides?.waitlist });
|
|
25
28
|
this.social = new Social({ ...shared, ...overrides?.social });
|
|
26
29
|
this.platformAuth = new PlatformAuth({ ...shared, ...overrides?.platformAuth });
|
|
30
|
+
this.trawl = new Trawl({ ...shared, ...overrides?.trawl });
|
|
27
31
|
}
|
|
28
32
|
};
|
|
29
33
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoDO,IAAM,eAAN,MAAmB;AAAA,EACR,IAAA;AAAA,EACA,IAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,EACA,KAAA;AAAA,EAEhB,WAAA,CACE,MAAA,GAAiE,EAAC,EAClE;AACA,IAAA,MAAM,EAAE,SAAA,EAAW,GAAG,MAAA,EAAO,GAAI,MAAA;AACjC,IAAA,IAAA,CAAK,IAAA,GAAO,IAAI,IAAA,CAAK,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,IAAA,EAAM,CAAA;AACtD,IAAA,IAAA,CAAK,IAAA,GAAO,IAAI,IAAA,CAAK,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,IAAA,EAAM,CAAA;AACtD,IAAA,IAAA,CAAK,QAAA,GAAW,IAAI,QAAA,CAAS,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,QAAA,EAAU,CAAA;AAClE,IAAA,IAAA,CAAK,MAAA,GAAS,IAAI,MAAA,CAAO,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,MAAA,EAAQ,CAAA;AAC5D,IAAA,IAAA,CAAK,YAAA,GAAe,IAAI,YAAA,CAAa,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,YAAA,EAAc,CAAA;AAC9E,IAAA,IAAA,CAAK,KAAA,GAAQ,IAAI,KAAA,CAAM,EAAE,GAAG,MAAA,EAAQ,GAAG,SAAA,EAAW,KAAA,EAAO,CAAA;AAAA,EAC3D;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.mail.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/auth` (and skip this umbrella).\n */\n\nimport { Auth } from \"@productcraft/auth\";\nimport { Mail } from \"@productcraft/mail\";\nimport { Waitlist } from \"@productcraft/waitlist\";\nimport { Social } from \"@productcraft/social\";\nimport { PlatformAuth } from \"@productcraft/platform-auth\";\nimport { Trawl } from \"@productcraft/trawl\";\nimport type { PCClientConfig } from \"@productcraft/core\";\n\nexport { Auth, Mail, Waitlist, Social, PlatformAuth, Trawl };\nexport { PC_BASE_URL, type PCAuth, type PCClientConfig } from \"@productcraft/core\";\n\n/**\n * Per-surface config overrides. Nested under `overrides` (rather than\n * flat keys) because the Auth surface's natural key — `auth` — would\n * collide with the shared `auth` credential field on `PCClientConfig`.\n */\nexport interface ProductCraftOverrides {\n auth?: PCClientConfig;\n mail?: PCClientConfig;\n waitlist?: PCClientConfig;\n social?: PCClientConfig;\n platformAuth?: PCClientConfig;\n trawl?: PCClientConfig;\n}\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, overrides: { mail: { baseUrl: \"...\" } } })`.\n */\nexport class ProductCraft {\n public readonly auth: Auth;\n public readonly mail: Mail;\n public readonly waitlist: Waitlist;\n public readonly social: Social;\n public readonly platformAuth: PlatformAuth;\n public readonly trawl: Trawl;\n\n constructor(\n config: PCClientConfig & { overrides?: ProductCraftOverrides } = {},\n ) {\n const { overrides, ...shared } = config;\n this.auth = new Auth({ ...shared, ...overrides?.auth });\n this.mail = new Mail({ ...shared, ...overrides?.mail });\n this.waitlist = new Waitlist({ ...shared, ...overrides?.waitlist });\n this.social = new Social({ ...shared, ...overrides?.social });\n this.platformAuth = new PlatformAuth({ ...shared, ...overrides?.platformAuth });\n this.trawl = new Trawl({ ...shared, ...overrides?.trawl });\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "productcraft",
|
|
3
|
-
"version": "0.1
|
|
4
|
-
"description": "All-in-one Node.js / TypeScript SDK for the ProductCraft platform — Auth, Mail, Waitlist, Social,
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "All-in-one Node.js / TypeScript SDK for the ProductCraft platform — Auth, Mail, Waitlist, Social, Platform-Auth, and Trawl from a single import. Install per-product packages (`@productcraft/auth`, ...) if you only need one.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -42,15 +42,17 @@
|
|
|
42
42
|
},
|
|
43
43
|
"homepage": "https://github.com/clauderanelagh/productcraft-node",
|
|
44
44
|
"publishConfig": {
|
|
45
|
-
"access": "public"
|
|
45
|
+
"access": "public",
|
|
46
|
+
"provenance": true
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@productcraft/social": "^0.
|
|
49
|
-
"@productcraft/core": "^0.
|
|
50
|
-
"@productcraft/mail": "^0.1.
|
|
51
|
-
"@productcraft/auth": "^0.5.
|
|
52
|
-
"@productcraft/platform-auth": "^0.0.
|
|
53
|
-
"@productcraft/waitlist": "^0.1.
|
|
49
|
+
"@productcraft/social": "^0.2.0",
|
|
50
|
+
"@productcraft/core": "^0.2.0",
|
|
51
|
+
"@productcraft/mail": "^0.1.1",
|
|
52
|
+
"@productcraft/auth": "^0.5.2",
|
|
53
|
+
"@productcraft/platform-auth": "^0.0.12",
|
|
54
|
+
"@productcraft/waitlist": "^0.1.1",
|
|
55
|
+
"@productcraft/trawl": "^0.1.1"
|
|
54
56
|
},
|
|
55
57
|
"scripts": {
|
|
56
58
|
"build": "tsup",
|