context.dev 0.1.0 → 0.3.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.
Files changed (79) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +17 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +17 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/ai.d.mts +331 -0
  12. package/resources/ai.d.mts.map +1 -0
  13. package/resources/ai.d.ts +331 -0
  14. package/resources/ai.d.ts.map +1 -0
  15. package/resources/ai.js +33 -0
  16. package/resources/ai.js.map +1 -0
  17. package/resources/ai.mjs +29 -0
  18. package/resources/ai.mjs.map +1 -0
  19. package/resources/brand.d.mts +12 -1056
  20. package/resources/brand.d.mts.map +1 -1
  21. package/resources/brand.d.ts +12 -1056
  22. package/resources/brand.d.ts.map +1 -1
  23. package/resources/brand.js +0 -106
  24. package/resources/brand.js.map +1 -1
  25. package/resources/brand.mjs +0 -106
  26. package/resources/brand.mjs.map +1 -1
  27. package/resources/index.d.mts +6 -1
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +6 -1
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +11 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +5 -0
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/industry.d.mts +70 -0
  36. package/resources/industry.d.mts.map +1 -0
  37. package/resources/industry.d.ts +70 -0
  38. package/resources/industry.d.ts.map +1 -0
  39. package/resources/industry.js +15 -0
  40. package/resources/industry.js.map +1 -0
  41. package/resources/industry.mjs +11 -0
  42. package/resources/industry.mjs.map +1 -0
  43. package/resources/style.d.mts +386 -0
  44. package/resources/style.d.mts.map +1 -0
  45. package/resources/style.d.ts +386 -0
  46. package/resources/style.d.ts.map +1 -0
  47. package/resources/style.js +25 -0
  48. package/resources/style.js.map +1 -0
  49. package/resources/style.mjs +21 -0
  50. package/resources/style.mjs.map +1 -0
  51. package/resources/utility.d.mts +79 -0
  52. package/resources/utility.d.mts.map +1 -0
  53. package/resources/utility.d.ts +79 -0
  54. package/resources/utility.d.ts.map +1 -0
  55. package/resources/utility.js +29 -0
  56. package/resources/utility.js.map +1 -0
  57. package/resources/utility.mjs +25 -0
  58. package/resources/utility.mjs.map +1 -0
  59. package/resources/web.d.mts +228 -0
  60. package/resources/web.d.mts.map +1 -0
  61. package/resources/web.d.ts +228 -0
  62. package/resources/web.d.ts.map +1 -0
  63. package/resources/web.js +49 -0
  64. package/resources/web.js.map +1 -0
  65. package/resources/web.mjs +45 -0
  66. package/resources/web.mjs.map +1 -0
  67. package/src/client.ts +93 -52
  68. package/src/resources/ai.ts +417 -0
  69. package/src/resources/brand.ts +318 -1424
  70. package/src/resources/index.ts +37 -26
  71. package/src/resources/industry.ts +92 -0
  72. package/src/resources/style.ts +522 -0
  73. package/src/resources/utility.ts +105 -0
  74. package/src/resources/web.ts +302 -0
  75. package/src/version.ts +1 -1
  76. package/version.d.mts +1 -1
  77. package/version.d.ts +1 -1
  78. package/version.js +1 -1
  79. package/version.mjs +1 -1
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AI = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ class AI extends resource_1.APIResource {
7
+ /**
8
+ * Use AI to extract specific data points from a brand's website. The AI will crawl
9
+ * the website and extract the requested information based on the provided data
10
+ * points.
11
+ */
12
+ aiQuery(body, options) {
13
+ return this._client.post('/brand/ai/query', { body, ...options });
14
+ }
15
+ /**
16
+ * Beta feature: Given a single URL, determines if it is a product detail page,
17
+ * classifies the platform/product type, and extracts the product information.
18
+ * Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
19
+ */
20
+ extractProduct(body, options) {
21
+ return this._client.post('/brand/ai/product', { body, ...options });
22
+ }
23
+ /**
24
+ * Beta feature: Extract product information from a brand's website. Brand.dev will
25
+ * analyze the website and return a list of products with details such as name,
26
+ * description, image, pricing, features, and more.
27
+ */
28
+ extractProducts(body, options) {
29
+ return this._client.post('/brand/ai/products', { body, ...options });
30
+ }
31
+ }
32
+ exports.AI = AI;
33
+ //# sourceMappingURL=ai.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.js","sourceRoot":"","sources":["../src/resources/ai.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,EAAG,SAAQ,sBAAW;IACjC;;;;OAIG;IACH,OAAO,CAAC,IAAqB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,cAAc,CACZ,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;OAIG;IACH,eAAe,CACb,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF;AAjCD,gBAiCC"}
@@ -0,0 +1,29 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ export class AI extends APIResource {
4
+ /**
5
+ * Use AI to extract specific data points from a brand's website. The AI will crawl
6
+ * the website and extract the requested information based on the provided data
7
+ * points.
8
+ */
9
+ aiQuery(body, options) {
10
+ return this._client.post('/brand/ai/query', { body, ...options });
11
+ }
12
+ /**
13
+ * Beta feature: Given a single URL, determines if it is a product detail page,
14
+ * classifies the platform/product type, and extracts the product information.
15
+ * Supports Amazon, TikTok Shop, Etsy, and generic ecommerce sites.
16
+ */
17
+ extractProduct(body, options) {
18
+ return this._client.post('/brand/ai/product', { body, ...options });
19
+ }
20
+ /**
21
+ * Beta feature: Extract product information from a brand's website. Brand.dev will
22
+ * analyze the website and return a list of products with details such as name,
23
+ * description, image, pricing, features, and more.
24
+ */
25
+ extractProducts(body, options) {
26
+ return this._client.post('/brand/ai/products', { body, ...options });
27
+ }
28
+ }
29
+ //# sourceMappingURL=ai.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.mjs","sourceRoot":"","sources":["../src/resources/ai.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,EAAG,SAAQ,WAAW;IACjC;;;;OAIG;IACH,OAAO,CAAC,IAAqB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,cAAc,CACZ,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;OAIG;IACH,eAAe,CACb,IAA6B,EAC7B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;CACF"}