@nodaro/sdk 1.12.0 → 1.13.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/dist/index.cjs CHANGED
@@ -1933,6 +1933,7 @@ var LibraryResource = class {
1933
1933
  if (params.limit !== void 0) qs.set("limit", String(params.limit));
1934
1934
  if (params.cursor) qs.set("cursor", params.cursor);
1935
1935
  if (params.owned !== void 0) qs.set("owned", String(params.owned));
1936
+ if (params.source) qs.set("source", params.source);
1936
1937
  const query = qs.toString();
1937
1938
  return this.client.request("GET", `/v1/library${query ? `?${query}` : ""}`);
1938
1939
  }
@@ -2117,8 +2118,42 @@ var CommunityResource = class {
2117
2118
  }
2118
2119
  };
2119
2120
 
2121
+ // src/resources/templates.ts
2122
+ var TemplatesResource = class {
2123
+ constructor(client) {
2124
+ this.client = client;
2125
+ }
2126
+ client;
2127
+ /** Browse the public template marketplace (cursor-paginated, no auth required). */
2128
+ browse(params = {}) {
2129
+ return this.client.request("GET", "/v1/templates/browse", { query: { ...params } });
2130
+ }
2131
+ /** Fetch one public template by slug, including its full workflow snapshot. */
2132
+ get(slug) {
2133
+ return this.client.request("GET", `/v1/templates/${encodeURIComponent(slug)}`);
2134
+ }
2135
+ /** Clone a template into one of the caller's projects. Free — no credits charged. */
2136
+ clone(slug, params) {
2137
+ return this.client.request("POST", `/v1/templates/${encodeURIComponent(slug)}/clone`, {
2138
+ body: params
2139
+ });
2140
+ }
2141
+ };
2142
+
2143
+ // src/resources/tutorials.ts
2144
+ var TutorialsResource = class {
2145
+ constructor(client) {
2146
+ this.client = client;
2147
+ }
2148
+ client;
2149
+ /** All enabled tutorial categories with their videos and flow tutorials. Public. */
2150
+ list() {
2151
+ return this.client.request("GET", "/v1/tutorials");
2152
+ }
2153
+ };
2154
+
2120
2155
  // src/client.ts
2121
- var SDK_VERSION = "1.12.0" ;
2156
+ var SDK_VERSION = "1.13.0" ;
2122
2157
  var CLIENT_HEADER = "X-Nodaro-Client";
2123
2158
  var isBrowser = () => typeof window !== "undefined" && typeof window.document !== "undefined";
2124
2159
  var NodaroClient = class {
@@ -2164,6 +2199,8 @@ var NodaroClient = class {
2164
2199
  presets;
2165
2200
  pickerCatalogs;
2166
2201
  community;
2202
+ templates;
2203
+ tutorials;
2167
2204
  constructor(opts) {
2168
2205
  this.baseUrl = opts.baseUrl.replace(/\/$/, "");
2169
2206
  this.auth = opts.auth;
@@ -2196,6 +2233,8 @@ var NodaroClient = class {
2196
2233
  this.presets = new PresetsResource(this);
2197
2234
  this.pickerCatalogs = new PickerCatalogsResource(this);
2198
2235
  this.community = new CommunityResource(this);
2236
+ this.templates = new TemplatesResource(this);
2237
+ this.tutorials = new TutorialsResource(this);
2199
2238
  }
2200
2239
  async request(method, path, options = {}) {
2201
2240
  const url = this.buildUrl(path, options.query);
@@ -2390,6 +2429,8 @@ exports.RateLimitedError = RateLimitedError;
2390
2429
  exports.ReduceResource = ReduceResource;
2391
2430
  exports.StaticTokenAuth = StaticTokenAuth;
2392
2431
  exports.StorageExceededError = StorageExceededError;
2432
+ exports.TemplatesResource = TemplatesResource;
2433
+ exports.TutorialsResource = TutorialsResource;
2393
2434
  exports.UnauthorizedError = UnauthorizedError;
2394
2435
  exports.UploadsResource = UploadsResource;
2395
2436
  exports.VideoProResource = VideoProResource;