@polar-sh/sdk 0.7.0 → 0.7.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/README.md CHANGED
@@ -519,6 +519,11 @@ async function run() {
519
519
  let result;
520
520
  try {
521
521
  result = await polar.users.benefits.list({});
522
+
523
+ for await (const page of result) {
524
+ // Handle the page
525
+ console.log(page);
526
+ }
522
527
  } catch (err) {
523
528
  switch (true) {
524
529
  case err instanceof SDKValidationError: {
@@ -538,11 +543,6 @@ async function run() {
538
543
  }
539
544
  }
540
545
  }
541
-
542
- for await (const page of result) {
543
- // Handle the page
544
- console.log(page);
545
- }
546
546
  }
547
547
 
548
548
  run();
@@ -25,7 +25,7 @@ async function run() {
25
25
  const result = await polar.advertisements.list({
26
26
  benefitId: "<value>",
27
27
  });
28
-
28
+
29
29
  for await (const page of result) {
30
30
  // Handle the page
31
31
  console.log(page);
@@ -107,7 +107,7 @@ async function run() {
107
107
  const result = await polar.advertisements.get({
108
108
  id: "<value>",
109
109
  });
110
-
110
+
111
111
  // Handle the result
112
112
  console.log(result)
113
113
  }
@@ -29,7 +29,7 @@ const polar = new Polar({
29
29
 
30
30
  async function run() {
31
31
  const result = await polar.articles.list({});
32
-
32
+
33
33
  for await (const page of result) {
34
34
  // Handle the page
35
35
  console.log(page);
@@ -109,7 +109,7 @@ async function run() {
109
109
  const result = await polar.articles.create({
110
110
  title: "<value>",
111
111
  });
112
-
112
+
113
113
  // Handle the result
114
114
  console.log(result)
115
115
  }
@@ -187,7 +187,7 @@ async function run() {
187
187
  const result = await polar.articles.get({
188
188
  id: "<value>",
189
189
  });
190
-
190
+
191
191
  // Handle the result
192
192
  console.log(result)
193
193
  }
@@ -267,7 +267,7 @@ async function run() {
267
267
  id: "<value>",
268
268
  articleUpdate: {},
269
269
  });
270
-
270
+
271
271
  // Handle the result
272
272
  console.log(result)
273
273
  }
@@ -348,8 +348,6 @@ async function run() {
348
348
  await polar.articles.delete({
349
349
  id: "<value>",
350
350
  });
351
-
352
-
353
351
  }
354
352
 
355
353
  run();
@@ -426,7 +424,7 @@ async function run() {
426
424
  const result = await polar.articles.receivers({
427
425
  id: "<value>",
428
426
  });
429
-
427
+
430
428
  // Handle the result
431
429
  console.log(result)
432
430
  }
@@ -507,7 +505,7 @@ async function run() {
507
505
  email: "Eileen56@yahoo.com",
508
506
  },
509
507
  });
510
-
508
+
511
509
  // Handle the result
512
510
  console.log(result)
513
511
  }
@@ -590,7 +588,7 @@ async function run() {
590
588
  const result = await polar.articles.send({
591
589
  id: "<value>",
592
590
  });
593
-
591
+
594
592
  // Handle the result
595
593
  console.log(result)
596
594
  }
@@ -27,7 +27,7 @@ const polar = new Polar({
27
27
 
28
28
  async function run() {
29
29
  const result = await polar.benefits.list({});
30
-
30
+
31
31
  for await (const page of result) {
32
32
  // Handle the page
33
33
  console.log(page);
@@ -111,7 +111,7 @@ async function run() {
111
111
  roleId: "<value>",
112
112
  },
113
113
  });
114
-
114
+
115
115
  // Handle the result
116
116
  console.log(result)
117
117
  }
@@ -193,7 +193,7 @@ async function run() {
193
193
  const result = await polar.benefits.get({
194
194
  id: "<value>",
195
195
  });
196
-
196
+
197
197
  // Handle the result
198
198
  console.log(result)
199
199
  }
@@ -273,7 +273,7 @@ async function run() {
273
273
  id: "<value>",
274
274
  requestBody: {},
275
275
  });
276
-
276
+
277
277
  // Handle the result
278
278
  console.log(result)
279
279
  }
@@ -364,8 +364,6 @@ async function run() {
364
364
  await polar.benefits.delete({
365
365
  id: "<value>",
366
366
  });
367
-
368
-
369
367
  }
370
368
 
371
369
  run();
@@ -444,7 +442,7 @@ async function run() {
444
442
  const result = await polar.benefits.grants({
445
443
  id: "<value>",
446
444
  });
447
-
445
+
448
446
  for await (const page of result) {
449
447
  // Handle the page
450
448
  console.log(page);
@@ -26,7 +26,7 @@ async function run() {
26
26
  productPriceId: "<value>",
27
27
  successUrl: "http://limp-pastry.org",
28
28
  });
29
-
29
+
30
30
  // Handle the result
31
31
  console.log(result)
32
32
  }
@@ -105,7 +105,7 @@ async function run() {
105
105
  const result = await polar.checkouts.get({
106
106
  id: "<id>",
107
107
  });
108
-
108
+
109
109
  // Handle the result
110
110
  console.log(result)
111
111
  }
@@ -26,7 +26,7 @@ const polar = new Polar({
26
26
 
27
27
  async function run() {
28
28
  const result = await polar.oauth2.clients.list({});
29
-
29
+
30
30
  for await (const page of result) {
31
31
  // Handle the page
32
32
  console.log(page);
@@ -109,7 +109,7 @@ async function run() {
109
109
  ],
110
110
  clientName: "<value>",
111
111
  });
112
-
112
+
113
113
  // Handle the result
114
114
  console.log(result)
115
115
  }
@@ -190,7 +190,7 @@ async function run() {
190
190
  const result = await polar.oauth2.clients.get({
191
191
  clientId: "<value>",
192
192
  });
193
-
193
+
194
194
  // Handle the result
195
195
  console.log(result)
196
196
  }
@@ -275,7 +275,7 @@ async function run() {
275
275
  clientId: "<value>",
276
276
  },
277
277
  });
278
-
278
+
279
279
  // Handle the result
280
280
  console.log(result)
281
281
  }
@@ -360,7 +360,7 @@ async function run() {
360
360
  const result = await polar.oauth2.clients.delete({
361
361
  clientId: "<value>",
362
362
  });
363
-
363
+
364
364
  // Handle the result
365
365
  console.log(result)
366
366
  }
@@ -23,7 +23,7 @@ const polar = new Polar({
23
23
 
24
24
  async function run() {
25
25
  const result = await polar.users.downloadables.list({});
26
-
26
+
27
27
  for await (const page of result) {
28
28
  // Handle the page
29
29
  console.log(page);
@@ -103,7 +103,7 @@ async function run() {
103
103
  const result = await polar.users.downloadables.get({
104
104
  token: "<value>",
105
105
  });
106
-
106
+
107
107
  // Handle the result
108
108
  console.log(result)
109
109
  }
@@ -22,7 +22,7 @@ const polar = new Polar({
22
22
 
23
23
  async function run() {
24
24
  const result = await polar.externalOrganizations.list({});
25
-
25
+
26
26
  for await (const page of result) {
27
27
  // Handle the page
28
28
  console.log(page);
@@ -26,7 +26,7 @@ const polar = new Polar({
26
26
 
27
27
  async function run() {
28
28
  const result = await polar.files.list({});
29
-
29
+
30
30
  for await (const page of result) {
31
31
  // Handle the page
32
32
  console.log(page);
@@ -117,7 +117,7 @@ async function run() {
117
117
  ],
118
118
  },
119
119
  });
120
-
120
+
121
121
  // Handle the result
122
122
  console.log(result)
123
123
  }
@@ -217,7 +217,7 @@ async function run() {
217
217
  ],
218
218
  },
219
219
  });
220
-
220
+
221
221
  // Handle the result
222
222
  console.log(result)
223
223
  }
@@ -307,7 +307,7 @@ async function run() {
307
307
  id: "<value>",
308
308
  filePatch: {},
309
309
  });
310
-
310
+
311
311
  // Handle the result
312
312
  console.log(result)
313
313
  }
@@ -386,8 +386,6 @@ async function run() {
386
386
  await polar.files.delete({
387
387
  id: "<value>",
388
388
  });
389
-
390
-
391
389
  }
392
390
 
393
391
  run();
@@ -25,7 +25,7 @@ const polar = new Polar({
25
25
 
26
26
  async function run() {
27
27
  const result = await polar.licenseKeys.list({});
28
-
28
+
29
29
  for await (const page of result) {
30
30
  // Handle the page
31
31
  console.log(page);
@@ -107,7 +107,7 @@ async function run() {
107
107
  const result = await polar.licenseKeys.get({
108
108
  id: "<value>",
109
109
  });
110
-
110
+
111
111
  // Handle the result
112
112
  console.log(result)
113
113
  }
@@ -188,7 +188,7 @@ async function run() {
188
188
  id: "<value>",
189
189
  licenseKeyUpdate: {},
190
190
  });
191
-
191
+
192
192
  // Handle the result
193
193
  console.log(result)
194
194
  }
@@ -270,7 +270,7 @@ async function run() {
270
270
  id: "<value>",
271
271
  activationId: "<value>",
272
272
  });
273
-
273
+
274
274
  // Handle the result
275
275
  console.log(result)
276
276
  }
@@ -28,7 +28,7 @@ async function run() {
28
28
  endDate: new RFCDate("2022-04-09"),
29
29
  interval: "week",
30
30
  });
31
-
31
+
32
32
  // Handle the result
33
33
  console.log(result)
34
34
  }
@@ -107,7 +107,7 @@ const polar = new Polar({
107
107
 
108
108
  async function run() {
109
109
  const result = await polar.metrics.limits();
110
-
110
+
111
111
  // Handle the result
112
112
  console.log(result)
113
113
  }
@@ -30,7 +30,7 @@ async function run() {
30
30
  code: "<value>",
31
31
  redirectUri: "http://multicolored-chivalry.name",
32
32
  });
33
-
33
+
34
34
  // Handle the result
35
35
  console.log(result)
36
36
  }
@@ -112,7 +112,7 @@ async function run() {
112
112
  clientId: "<value>",
113
113
  clientSecret: "<value>",
114
114
  });
115
-
115
+
116
116
  // Handle the result
117
117
  console.log(result)
118
118
  }
@@ -193,7 +193,7 @@ async function run() {
193
193
  clientId: "<value>",
194
194
  clientSecret: "<value>",
195
195
  });
196
-
196
+
197
197
  // Handle the result
198
198
  console.log(result)
199
199
  }
@@ -270,7 +270,7 @@ const polar = new Polar({
270
270
 
271
271
  async function run() {
272
272
  const result = await polar.oauth2.userinfo();
273
-
273
+
274
274
  // Handle the result
275
275
  console.log(result)
276
276
  }
@@ -24,7 +24,7 @@ const polar = new Polar({
24
24
 
25
25
  async function run() {
26
26
  const result = await polar.orders.list({});
27
-
27
+
28
28
  for await (const page of result) {
29
29
  // Handle the page
30
30
  console.log(page);
@@ -104,7 +104,7 @@ async function run() {
104
104
  const result = await polar.orders.get({
105
105
  id: "<value>",
106
106
  });
107
-
107
+
108
108
  // Handle the result
109
109
  console.log(result)
110
110
  }
@@ -183,7 +183,7 @@ async function run() {
183
183
  const result = await polar.orders.invoice({
184
184
  id: "<value>",
185
185
  });
186
-
186
+
187
187
  // Handle the result
188
188
  console.log(result)
189
189
  }
@@ -25,7 +25,7 @@ const polar = new Polar({
25
25
 
26
26
  async function run() {
27
27
  const result = await polar.organizations.list({});
28
-
28
+
29
29
  for await (const page of result) {
30
30
  // Handle the page
31
31
  console.log(page);
@@ -106,7 +106,7 @@ async function run() {
106
106
  name: "<value>",
107
107
  slug: "<value>",
108
108
  });
109
-
109
+
110
110
  // Handle the result
111
111
  console.log(result)
112
112
  }
@@ -185,7 +185,7 @@ async function run() {
185
185
  const result = await polar.organizations.get({
186
186
  id: "<value>",
187
187
  });
188
-
188
+
189
189
  // Handle the result
190
190
  console.log(result)
191
191
  }
@@ -265,7 +265,7 @@ async function run() {
265
265
  id: "<value>",
266
266
  organizationUpdate: {},
267
267
  });
268
-
268
+
269
269
  // Handle the result
270
270
  console.log(result)
271
271
  }
@@ -27,7 +27,7 @@ const polar = new Polar({
27
27
 
28
28
  async function run() {
29
29
  const result = await polar.users.advertisements.list({});
30
-
30
+
31
31
  for await (const page of result) {
32
32
  // Handle the page
33
33
  console.log(page);
@@ -109,7 +109,7 @@ async function run() {
109
109
  text: "<value>",
110
110
  linkUrl: "http://flashy-cartload.net",
111
111
  });
112
-
112
+
113
113
  // Handle the result
114
114
  console.log(result)
115
115
  }
@@ -189,7 +189,7 @@ async function run() {
189
189
  const result = await polar.users.advertisements.get({
190
190
  id: "<value>",
191
191
  });
192
-
192
+
193
193
  // Handle the result
194
194
  console.log(result)
195
195
  }
@@ -269,7 +269,7 @@ async function run() {
269
269
  id: "<value>",
270
270
  userAdvertisementCampaignUpdate: {},
271
271
  });
272
-
272
+
273
273
  // Handle the result
274
274
  console.log(result)
275
275
  }
@@ -351,7 +351,7 @@ async function run() {
351
351
  const result = await polar.users.advertisements.delete({
352
352
  id: "<value>",
353
353
  });
354
-
354
+
355
355
  // Handle the result
356
356
  console.log(result)
357
357
  }
@@ -433,8 +433,6 @@ async function run() {
433
433
  benefitId: "<value>",
434
434
  },
435
435
  });
436
-
437
-
438
436
  }
439
437
 
440
438
  run();
@@ -23,7 +23,7 @@ const polar = new Polar({
23
23
 
24
24
  async function run() {
25
25
  const result = await polar.users.benefits.list({});
26
-
26
+
27
27
  for await (const page of result) {
28
28
  // Handle the page
29
29
  console.log(page);
@@ -103,7 +103,7 @@ async function run() {
103
103
  const result = await polar.users.benefits.get({
104
104
  id: "<value>",
105
105
  });
106
-
106
+
107
107
  // Handle the result
108
108
  console.log(result)
109
109
  }
@@ -26,7 +26,7 @@ const polar = new Polar({
26
26
 
27
27
  async function run() {
28
28
  const result = await polar.users.licenseKeys.list({});
29
-
29
+
30
30
  for await (const page of result) {
31
31
  // Handle the page
32
32
  console.log(page);
@@ -108,7 +108,7 @@ async function run() {
108
108
  const result = await polar.users.licenseKeys.get({
109
109
  id: "<value>",
110
110
  });
111
-
111
+
112
112
  // Handle the result
113
113
  console.log(result)
114
114
  }
@@ -189,7 +189,7 @@ async function run() {
189
189
  key: "<key>",
190
190
  organizationId: "<value>",
191
191
  });
192
-
192
+
193
193
  // Handle the result
194
194
  console.log(result)
195
195
  }
@@ -271,7 +271,7 @@ async function run() {
271
271
  organizationId: "<value>",
272
272
  label: "<value>",
273
273
  });
274
-
274
+
275
275
  // Handle the result
276
276
  console.log(result)
277
277
  }
@@ -355,8 +355,6 @@ async function run() {
355
355
  organizationId: "<value>",
356
356
  activationId: "<value>",
357
357
  });
358
-
359
-
360
358
  }
361
359
 
362
360
  run();
@@ -24,7 +24,7 @@ const polar = new Polar({
24
24
 
25
25
  async function run() {
26
26
  const result = await polar.users.orders.list({});
27
-
27
+
28
28
  for await (const page of result) {
29
29
  // Handle the page
30
30
  console.log(page);
@@ -104,7 +104,7 @@ async function run() {
104
104
  const result = await polar.users.orders.get({
105
105
  id: "<value>",
106
106
  });
107
-
107
+
108
108
  // Handle the result
109
109
  console.log(result)
110
110
  }
@@ -183,7 +183,7 @@ async function run() {
183
183
  const result = await polar.users.orders.invoice({
184
184
  id: "<value>",
185
185
  });
186
-
186
+
187
187
  // Handle the result
188
188
  console.log(result)
189
189
  }
@@ -26,7 +26,7 @@ const polar = new Polar({
26
26
 
27
27
  async function run() {
28
28
  const result = await polar.users.subscriptions.list({});
29
-
29
+
30
30
  for await (const page of result) {
31
31
  // Handle the page
32
32
  console.log(page);
@@ -108,7 +108,7 @@ async function run() {
108
108
  const result = await polar.users.subscriptions.create({
109
109
  productId: "<value>",
110
110
  });
111
-
111
+
112
112
  // Handle the result
113
113
  console.log(result)
114
114
  }
@@ -188,7 +188,7 @@ async function run() {
188
188
  const result = await polar.users.subscriptions.get({
189
189
  id: "<value>",
190
190
  });
191
-
191
+
192
192
  // Handle the result
193
193
  console.log(result)
194
194
  }
@@ -270,7 +270,7 @@ async function run() {
270
270
  productPriceId: "<value>",
271
271
  },
272
272
  });
273
-
273
+
274
274
  // Handle the result
275
275
  console.log(result)
276
276
  }
@@ -353,7 +353,7 @@ async function run() {
353
353
  const result = await polar.users.subscriptions.cancel({
354
354
  id: "<value>",
355
355
  });
356
-
356
+
357
357
  // Handle the result
358
358
  console.log(result)
359
359
  }
@@ -26,7 +26,7 @@ const polar = new Polar({
26
26
 
27
27
  async function run() {
28
28
  const result = await polar.products.list({});
29
-
29
+
30
30
  for await (const page of result) {
31
31
  // Handle the page
32
32
  console.log(page);
@@ -112,7 +112,7 @@ async function run() {
112
112
  },
113
113
  ],
114
114
  });
115
-
115
+
116
116
  // Handle the result
117
117
  console.log(result)
118
118
  }
@@ -196,7 +196,7 @@ async function run() {
196
196
  const result = await polar.products.get({
197
197
  id: "<value>",
198
198
  });
199
-
199
+
200
200
  // Handle the result
201
201
  console.log(result)
202
202
  }
@@ -276,7 +276,7 @@ async function run() {
276
276
  id: "<value>",
277
277
  productUpdate: {},
278
278
  });
279
-
279
+
280
280
  // Handle the result
281
281
  console.log(result)
282
282
  }
@@ -362,7 +362,7 @@ async function run() {
362
362
  ],
363
363
  },
364
364
  });
365
-
365
+
366
366
  // Handle the result
367
367
  console.log(result)
368
368
  }
@@ -24,7 +24,7 @@ const polar = new Polar({
24
24
 
25
25
  async function run() {
26
26
  const result = await polar.repositories.list({});
27
-
27
+
28
28
  for await (const page of result) {
29
29
  // Handle the page
30
30
  console.log(page);
@@ -104,7 +104,7 @@ async function run() {
104
104
  const result = await polar.repositories.get({
105
105
  id: "<value>",
106
106
  });
107
-
107
+
108
108
  // Handle the result
109
109
  console.log(result)
110
110
  }
@@ -184,7 +184,7 @@ async function run() {
184
184
  id: "<value>",
185
185
  repositoryUpdate: {},
186
186
  });
187
-
187
+
188
188
  // Handle the result
189
189
  console.log(result)
190
190
  }
@@ -25,7 +25,7 @@ const polar = new Polar({
25
25
 
26
26
  async function run() {
27
27
  const result = await polar.subscriptions.list({});
28
-
28
+
29
29
  for await (const page of result) {
30
30
  // Handle the page
31
31
  console.log(page);
@@ -106,7 +106,7 @@ async function run() {
106
106
  email: "Jena.Nienow28@yahoo.com",
107
107
  productId: "<value>",
108
108
  });
109
-
109
+
110
110
  // Handle the result
111
111
  console.log(result)
112
112
  }
@@ -187,7 +187,7 @@ async function run() {
187
187
  file: await openAsBlob("./sample-file"),
188
188
  organizationId: "<value>",
189
189
  });
190
-
190
+
191
191
  // Handle the result
192
192
  console.log(result)
193
193
  }
@@ -265,7 +265,7 @@ const polar = new Polar({
265
265
 
266
266
  async function run() {
267
267
  const result = await polar.subscriptions.export({});
268
-
268
+
269
269
  // Handle the result
270
270
  console.log(result)
271
271
  }
package/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "0.1.0";
30
- readonly sdkVersion: "0.7.0";
31
- readonly genVersion: "2.409.0";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.7.0 2.409.0 0.1.0 @polar-sh/sdk";
30
+ readonly sdkVersion: "0.7.1";
31
+ readonly genVersion: "2.409.8";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.7.1 2.409.8 0.1.0 @polar-sh/sdk";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -27,8 +27,8 @@ function serverURLFromOptions(options) {
27
27
  exports.SDK_METADATA = {
28
28
  language: "typescript",
29
29
  openapiDocVersion: "0.1.0",
30
- sdkVersion: "0.7.0",
31
- genVersion: "2.409.0",
32
- userAgent: "speakeasy-sdk/typescript 0.7.0 2.409.0 0.1.0 @polar-sh/sdk",
30
+ sdkVersion: "0.7.1",
31
+ genVersion: "2.409.8",
32
+ userAgent: "speakeasy-sdk/typescript 0.7.1 2.409.8 0.1.0 @polar-sh/sdk",
33
33
  };
34
34
  //# sourceMappingURL=config.js.map
package/lib/files.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- export declare function toStream(filePath: string): ReadableStream<Uint8Array>;
2
- export declare function toByteArray(filePath: string): Promise<Buffer>;
3
- export declare function toString(filePath: string): Promise<string>;
4
1
  /**
5
2
  * Consumes a stream and returns a concatenated array buffer. Useful in
6
3
  * situations where we need to read the whole file because it forms part of a
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/lib/files.ts"],"names":[],"mappings":"AAQA,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,CAIrE;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnE;AAED,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAEhE;AAED;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,WAAW,CAAC,CA2BtB"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../src/lib/files.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GACnC,OAAO,CAAC,WAAW,CAAC,CA2BtB"}
package/lib/files.js CHANGED
@@ -3,22 +3,7 @@
3
3
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.toStream = toStream;
7
- exports.toByteArray = toByteArray;
8
- exports.toString = toString;
9
6
  exports.readableStreamToArrayBuffer = readableStreamToArrayBuffer;
10
- const stream_1 = require("stream");
11
- const fs_1 = require("fs");
12
- const promises_1 = require("fs/promises");
13
- function toStream(filePath) {
14
- return stream_1.Readable.toWeb((0, fs_1.createReadStream)(filePath));
15
- }
16
- async function toByteArray(filePath) {
17
- return (0, promises_1.readFile)(filePath);
18
- }
19
- async function toString(filePath) {
20
- return (0, promises_1.readFile)(filePath, "utf8");
21
- }
22
7
  /**
23
8
  * Consumes a stream and returns a concatenated array buffer. Useful in
24
9
  * situations where we need to read the whole file because it forms part of a
package/lib/files.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../src/lib/files.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAMH,4BAIC;AAED,kCAEC;AAED,4BAEC;AAQD,kEA6BC;AArDD,mCAAkC;AAClC,2BAAsC;AACtC,0CAAuC;AAEvC,SAAgB,QAAQ,CAAC,QAAgB;IACvC,OAAO,iBAAQ,CAAC,KAAK,CACnB,IAAA,qBAAgB,EAAC,QAAQ,CAAC,CACG,CAAC;AAClC,CAAC;AAEM,KAAK,UAAU,WAAW,CAAC,QAAgB;IAChD,OAAO,IAAA,mBAAQ,EAAC,QAAQ,CAAC,CAAC;AAC5B,CAAC;AAEM,KAAK,UAAU,QAAQ,CAAC,QAAgB;IAC7C,OAAO,IAAA,mBAAQ,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,2BAA2B,CAC/C,QAAoC;IAEpC,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACpC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,IAAI,GAAG,KAAK,CAAC;IAEjB,OAAO,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEzD,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,kBAAkB,CAAC,MAAM,CAAC;AACnC,CAAC"}
1
+ {"version":3,"file":"files.js","sourceRoot":"","sources":["../src/lib/files.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAQH,kEA6BC;AAnCD;;;;;GAKG;AACI,KAAK,UAAU,2BAA2B,CAC/C,QAAoC;IAEpC,MAAM,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;IACpC,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,IAAI,IAAI,GAAG,KAAK,CAAC;IAEjB,OAAO,CAAC,IAAI,EAAE,CAAC;QACb,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;QAEzD,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,GAAG,IAAI,CAAC;QACd,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnB,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,MAAM,kBAAkB,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,kBAAkB,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC;IACzB,CAAC;IAED,OAAO,kBAAkB,CAAC,MAAM,CAAC;AACnC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polar-sh/sdk",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "author": "Speakeasy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -52,7 +52,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
52
52
  export const SDK_METADATA = {
53
53
  language: "typescript",
54
54
  openapiDocVersion: "0.1.0",
55
- sdkVersion: "0.7.0",
56
- genVersion: "2.409.0",
57
- userAgent: "speakeasy-sdk/typescript 0.7.0 2.409.0 0.1.0 @polar-sh/sdk",
55
+ sdkVersion: "0.7.1",
56
+ genVersion: "2.409.8",
57
+ userAgent: "speakeasy-sdk/typescript 0.7.1 2.409.8 0.1.0 @polar-sh/sdk",
58
58
  } as const;
package/src/lib/files.ts CHANGED
@@ -2,24 +2,6 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { Readable } from "stream";
6
- import { createReadStream } from "fs";
7
- import { readFile } from "fs/promises";
8
-
9
- export function toStream(filePath: string): ReadableStream<Uint8Array> {
10
- return Readable.toWeb(
11
- createReadStream(filePath),
12
- ) as ReadableStream<Uint8Array>;
13
- }
14
-
15
- export async function toByteArray(filePath: string): Promise<Buffer> {
16
- return readFile(filePath);
17
- }
18
-
19
- export async function toString(filePath: string): Promise<string> {
20
- return readFile(filePath, "utf8");
21
- }
22
-
23
5
  /**
24
6
  * Consumes a stream and returns a concatenated array buffer. Useful in
25
7
  * situations where we need to read the whole file because it forms part of a