@ownkeyhq/sdk 0.2.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.
@@ -145,6 +145,24 @@ export interface paths {
145
145
  patch: operations["products.update"];
146
146
  trace?: never;
147
147
  };
148
+ "/v1/products/{product}/logo": {
149
+ parameters: {
150
+ query?: never;
151
+ header?: never;
152
+ path?: never;
153
+ cookie?: never;
154
+ };
155
+ get?: never;
156
+ /** Upload a PNG, JPEG or WebP logo, up to 1 MB, if the product still has the supplied updated_at. */
157
+ put: operations["products.uploadLogo"];
158
+ post?: never;
159
+ /** Remove the current product logo if the product still has the supplied updated_at. */
160
+ delete: operations["products.removeLogo"];
161
+ options?: never;
162
+ head?: never;
163
+ patch?: never;
164
+ trace?: never;
165
+ };
148
166
  "/v1/plans": {
149
167
  parameters: {
150
168
  query?: never;
@@ -335,6 +353,23 @@ export interface paths {
335
353
  patch?: never;
336
354
  trace?: never;
337
355
  };
356
+ "/v1/connections/{connection}/lemon-reconciliation": {
357
+ parameters: {
358
+ query?: never;
359
+ header?: never;
360
+ path?: never;
361
+ cookie?: never;
362
+ };
363
+ /** List differences from a completed Lemon Squeezy reconciliation and read the clean-day streak. */
364
+ get: operations["lemonReconciliation.list"];
365
+ put?: never;
366
+ post?: never;
367
+ delete?: never;
368
+ options?: never;
369
+ head?: never;
370
+ patch?: never;
371
+ trace?: never;
372
+ };
338
373
  "/v1/connections/{connection}/paddle-classic/historical-adjustments": {
339
374
  parameters: {
340
375
  query?: never;
@@ -498,7 +533,7 @@ export interface paths {
498
533
  };
499
534
  get?: never;
500
535
  put?: never;
501
- /** Permanently remove an obsolete file. Downloads for that file and version will stop. Requires a verified replacement and explicit confirmation. */
536
+ /** Permanently remove one file with explicit confirmation. If the release has not been yanked, a newer stable release must provide a verified equivalent file. */
502
537
  post: operations["releases.removeAsset"];
503
538
  delete?: never;
504
539
  options?: never;
@@ -659,6 +694,40 @@ export interface paths {
659
694
  patch?: never;
660
695
  trace?: never;
661
696
  };
697
+ "/v1/imports/lemonsqueezy/readiness": {
698
+ parameters: {
699
+ query?: never;
700
+ header?: never;
701
+ path?: never;
702
+ cookie?: never;
703
+ };
704
+ /** Count subscription and license records to check before switching from Lemon Squeezy. */
705
+ get: operations["imports.lemonsqueezy.readiness"];
706
+ put?: never;
707
+ post?: never;
708
+ delete?: never;
709
+ options?: never;
710
+ head?: never;
711
+ patch?: never;
712
+ trace?: never;
713
+ };
714
+ "/v1/imports/polar/link-customers": {
715
+ parameters: {
716
+ query?: never;
717
+ header?: never;
718
+ path?: never;
719
+ cookie?: never;
720
+ };
721
+ get?: never;
722
+ put?: never;
723
+ /** Preview or apply Ownkey customer links for a Polar organization. */
724
+ post: operations["imports.polar.linkCustomers"];
725
+ delete?: never;
726
+ options?: never;
727
+ head?: never;
728
+ patch?: never;
729
+ trace?: never;
730
+ };
662
731
  "/v1/imports/edd/sources": {
663
732
  parameters: {
664
733
  query?: never;
@@ -873,7 +942,7 @@ export interface paths {
873
942
  };
874
943
  get?: never;
875
944
  put?: never;
876
- /** Activate a license key on a site, without a seller key. The same site again returns the same instance_id. Local and staging sites take no slot, up to the free-site cap. */
945
+ /** Activate a license key on a site, without a seller key. A repeat returns the site's current instance_id. Local and staging sites take no slot, up to the free-site cap. */
877
946
  post: operations["licenses.activate"];
878
947
  delete?: never;
879
948
  options?: never;
@@ -2278,6 +2347,7 @@ export interface operations {
2278
2347
  key_prefix: string | null;
2279
2348
  install_instructions: string | null;
2280
2349
  activate_instructions: string | null;
2350
+ logo_url: string | null;
2281
2351
  created_at: string;
2282
2352
  updated_at: string;
2283
2353
  }[];
@@ -2335,6 +2405,7 @@ export interface operations {
2335
2405
  key_prefix: string | null;
2336
2406
  install_instructions: string | null;
2337
2407
  activate_instructions: string | null;
2408
+ logo_url: string | null;
2338
2409
  created_at: string;
2339
2410
  updated_at: string;
2340
2411
  };
@@ -2381,6 +2452,7 @@ export interface operations {
2381
2452
  key_prefix: string | null;
2382
2453
  install_instructions: string | null;
2383
2454
  activate_instructions: string | null;
2455
+ logo_url: string | null;
2384
2456
  created_at: string;
2385
2457
  updated_at: string;
2386
2458
  };
@@ -2436,6 +2508,109 @@ export interface operations {
2436
2508
  key_prefix: string | null;
2437
2509
  install_instructions: string | null;
2438
2510
  activate_instructions: string | null;
2511
+ logo_url: string | null;
2512
+ created_at: string;
2513
+ updated_at: string;
2514
+ };
2515
+ };
2516
+ };
2517
+ /** @description Refusal */
2518
+ default: {
2519
+ headers: {
2520
+ [name: string]: unknown;
2521
+ };
2522
+ content: {
2523
+ "application/json": {
2524
+ error: {
2525
+ code: string;
2526
+ message: string;
2527
+ };
2528
+ };
2529
+ };
2530
+ };
2531
+ };
2532
+ };
2533
+ "products.uploadLogo": {
2534
+ parameters: {
2535
+ query: {
2536
+ expected_updated_at: string;
2537
+ };
2538
+ header?: never;
2539
+ path: {
2540
+ product: string;
2541
+ };
2542
+ cookie?: never;
2543
+ };
2544
+ requestBody: {
2545
+ content: {
2546
+ "application/octet-stream": string;
2547
+ };
2548
+ };
2549
+ responses: {
2550
+ /** @description OK */
2551
+ 200: {
2552
+ headers: {
2553
+ [name: string]: unknown;
2554
+ };
2555
+ content: {
2556
+ "application/json": {
2557
+ id: string;
2558
+ brand_id: string;
2559
+ slug: string;
2560
+ name: string;
2561
+ key_prefix: string | null;
2562
+ install_instructions: string | null;
2563
+ activate_instructions: string | null;
2564
+ logo_url: string | null;
2565
+ created_at: string;
2566
+ updated_at: string;
2567
+ };
2568
+ };
2569
+ };
2570
+ /** @description Refusal */
2571
+ default: {
2572
+ headers: {
2573
+ [name: string]: unknown;
2574
+ };
2575
+ content: {
2576
+ "application/json": {
2577
+ error: {
2578
+ code: string;
2579
+ message: string;
2580
+ };
2581
+ };
2582
+ };
2583
+ };
2584
+ };
2585
+ };
2586
+ "products.removeLogo": {
2587
+ parameters: {
2588
+ query: {
2589
+ expected_updated_at: string;
2590
+ };
2591
+ header?: never;
2592
+ path: {
2593
+ product: string;
2594
+ };
2595
+ cookie?: never;
2596
+ };
2597
+ requestBody?: never;
2598
+ responses: {
2599
+ /** @description OK */
2600
+ 200: {
2601
+ headers: {
2602
+ [name: string]: unknown;
2603
+ };
2604
+ content: {
2605
+ "application/json": {
2606
+ id: string;
2607
+ brand_id: string;
2608
+ slug: string;
2609
+ name: string;
2610
+ key_prefix: string | null;
2611
+ install_instructions: string | null;
2612
+ activate_instructions: string | null;
2613
+ logo_url: string | null;
2439
2614
  created_at: string;
2440
2615
  updated_at: string;
2441
2616
  };
@@ -3055,6 +3230,11 @@ export interface operations {
3055
3230
  closes_at: string | null;
3056
3231
  external_store_id: string | null;
3057
3232
  has_webhook_secret: boolean;
3233
+ capabilities: {
3234
+ new_payments: boolean;
3235
+ renewals: boolean;
3236
+ price_mapping: ("product" | "price") | null;
3237
+ };
3058
3238
  created_at: string;
3059
3239
  updated_at: string;
3060
3240
  }[];
@@ -3118,6 +3298,11 @@ export interface operations {
3118
3298
  closes_at: string | null;
3119
3299
  external_store_id: string | null;
3120
3300
  has_webhook_secret: boolean;
3301
+ capabilities: {
3302
+ new_payments: boolean;
3303
+ renewals: boolean;
3304
+ price_mapping: ("product" | "price") | null;
3305
+ };
3121
3306
  created_at: string;
3122
3307
  updated_at: string;
3123
3308
  };
@@ -3175,6 +3360,11 @@ export interface operations {
3175
3360
  closes_at: string | null;
3176
3361
  external_store_id: string | null;
3177
3362
  has_webhook_secret: boolean;
3363
+ capabilities: {
3364
+ new_payments: boolean;
3365
+ renewals: boolean;
3366
+ price_mapping: ("product" | "price") | null;
3367
+ };
3178
3368
  created_at: string;
3179
3369
  updated_at: string;
3180
3370
  };
@@ -3280,6 +3470,11 @@ export interface operations {
3280
3470
  closes_at: string | null;
3281
3471
  external_store_id: string | null;
3282
3472
  has_webhook_secret: boolean;
3473
+ capabilities: {
3474
+ new_payments: boolean;
3475
+ renewals: boolean;
3476
+ price_mapping: ("product" | "price") | null;
3477
+ };
3283
3478
  created_at: string;
3284
3479
  updated_at: string;
3285
3480
  };
@@ -3341,6 +3536,58 @@ export interface operations {
3341
3536
  };
3342
3537
  };
3343
3538
  };
3539
+ "lemonReconciliation.list": {
3540
+ parameters: {
3541
+ query?: {
3542
+ completed_on?: string;
3543
+ offset?: number;
3544
+ };
3545
+ header?: never;
3546
+ path: {
3547
+ connection: string;
3548
+ };
3549
+ cookie?: never;
3550
+ };
3551
+ requestBody?: never;
3552
+ responses: {
3553
+ /** @description OK */
3554
+ 200: {
3555
+ headers: {
3556
+ [name: string]: unknown;
3557
+ };
3558
+ content: {
3559
+ "application/json": {
3560
+ completed_on: string | null;
3561
+ clean_days: number;
3562
+ in_progress: boolean;
3563
+ mismatches: {
3564
+ /** @enum {string} */
3565
+ resource: "license-keys" | "subscriptions" | "license-key-instances";
3566
+ external_id: string;
3567
+ field: string;
3568
+ ownkey: string | number | boolean | null;
3569
+ lemon_squeezy: string | number | boolean | null;
3570
+ }[];
3571
+ next_offset: number | null;
3572
+ };
3573
+ };
3574
+ };
3575
+ /** @description Refusal */
3576
+ default: {
3577
+ headers: {
3578
+ [name: string]: unknown;
3579
+ };
3580
+ content: {
3581
+ "application/json": {
3582
+ error: {
3583
+ code: string;
3584
+ message: string;
3585
+ };
3586
+ };
3587
+ };
3588
+ };
3589
+ };
3590
+ };
3344
3591
  "connections.importPaddleClassicAdjustment": {
3345
3592
  parameters: {
3346
3593
  query?: never;
@@ -3583,7 +3830,7 @@ export interface operations {
3583
3830
  committed_bytes: number;
3584
3831
  reserved_bytes: number;
3585
3832
  /** @enum {string} */
3586
- tier: "operator_managed" | "trial" | "start" | "grow" | "pro" | "scale" | "inactive";
3833
+ tier: "operator_managed" | "trial" | "start" | "indie" | "grow" | "studio" | "pro" | "business" | "scale" | "scale_100k" | "inactive";
3587
3834
  file_limit_bytes: number | null;
3588
3835
  storage_limit_bytes: number | null;
3589
3836
  available_bytes: number | null;
@@ -4578,6 +4825,105 @@ export interface operations {
4578
4825
  };
4579
4826
  };
4580
4827
  };
4828
+ "imports.lemonsqueezy.readiness": {
4829
+ parameters: {
4830
+ query: {
4831
+ connection: string;
4832
+ };
4833
+ header?: never;
4834
+ path?: never;
4835
+ cookie?: never;
4836
+ };
4837
+ requestBody?: never;
4838
+ responses: {
4839
+ /** @description OK */
4840
+ 200: {
4841
+ headers: {
4842
+ [name: string]: unknown;
4843
+ };
4844
+ content: {
4845
+ "application/json": {
4846
+ subscriptions_that_can_charge: number;
4847
+ subscriptions_without_license: number;
4848
+ subscriptions_with_polar_successor: number;
4849
+ open_polar_matches: number;
4850
+ licenses_canceled_without_successor: number;
4851
+ };
4852
+ };
4853
+ };
4854
+ /** @description Refusal */
4855
+ default: {
4856
+ headers: {
4857
+ [name: string]: unknown;
4858
+ };
4859
+ content: {
4860
+ "application/json": {
4861
+ error: {
4862
+ code: string;
4863
+ message: string;
4864
+ };
4865
+ };
4866
+ };
4867
+ };
4868
+ };
4869
+ };
4870
+ "imports.polar.linkCustomers": {
4871
+ parameters: {
4872
+ query?: never;
4873
+ header?: never;
4874
+ path?: never;
4875
+ cookie?: never;
4876
+ };
4877
+ requestBody: {
4878
+ content: {
4879
+ "application/json": {
4880
+ /** @description connection id */
4881
+ connection: string;
4882
+ /** @default false */
4883
+ apply?: boolean;
4884
+ };
4885
+ };
4886
+ };
4887
+ responses: {
4888
+ /** @description OK */
4889
+ 200: {
4890
+ headers: {
4891
+ [name: string]: unknown;
4892
+ };
4893
+ content: {
4894
+ "application/json": {
4895
+ planned: {
4896
+ polar_customer_id: string;
4897
+ customer_id: string;
4898
+ }[];
4899
+ linked: {
4900
+ polar_customer_id: string;
4901
+ customer_id: string;
4902
+ }[];
4903
+ skipped: {
4904
+ polar_customer_id: string;
4905
+ /** @enum {string} */
4906
+ reason: "external_id_set" | "missing_email" | "no_match" | "duplicate_email" | "external_id_in_use" | "account_conflict" | "customer_changed" | "update_rejected" | "verification_failed";
4907
+ }[];
4908
+ };
4909
+ };
4910
+ };
4911
+ /** @description Refusal */
4912
+ default: {
4913
+ headers: {
4914
+ [name: string]: unknown;
4915
+ };
4916
+ content: {
4917
+ "application/json": {
4918
+ error: {
4919
+ code: string;
4920
+ message: string;
4921
+ };
4922
+ };
4923
+ };
4924
+ };
4925
+ };
4926
+ };
4581
4927
  "imports.edd.listSources": {
4582
4928
  parameters: {
4583
4929
  query?: {
@@ -7126,7 +7472,7 @@ export interface operations {
7126
7472
  at_period_start: number | null;
7127
7473
  seller_count: number;
7128
7474
  /** @enum {string} */
7129
- tier: "start" | "grow" | "pro" | "scale" | "above_scale";
7475
+ tier: "start" | "indie" | "grow" | "studio" | "pro" | "business" | "scale" | "scale_100k" | "custom";
7130
7476
  };
7131
7477
  production_sites: number;
7132
7478
  top_products: {
@@ -7283,6 +7629,15 @@ export interface operations {
7283
7629
  "application/json": {
7284
7630
  /** @description Ordered alternative plans of the same product. Exclude the default plan. */
7285
7631
  alternate_plan_ids?: string[];
7632
+ /**
7633
+ * Format: uuid
7634
+ * @description Polar discount to apply to the new checkout.
7635
+ */
7636
+ discount_id?: string;
7637
+ /** @description Up to 5 attribution values, such as an analytics visitor id, copied to the provider checkout metadata. Keys starting with ownkey_ are reserved. */
7638
+ metadata?: {
7639
+ [key: string]: string;
7640
+ };
7286
7641
  /**
7287
7642
  * Format: uri
7288
7643
  * @description URL on the brand domain or a configured HTTPS origin for Polar's Back button.
@@ -7557,6 +7912,7 @@ export interface operations {
7557
7912
  product: {
7558
7913
  id: string;
7559
7914
  name: string;
7915
+ logo_url: string | null;
7560
7916
  install_instructions: string | null;
7561
7917
  activate_instructions: string | null;
7562
7918
  install_html: string | null;
@@ -7621,6 +7977,10 @@ export interface operations {
7621
7977
  current_period_end: string | null;
7622
7978
  /** @description the provider offers a page to manage it */
7623
7979
  manageable: boolean;
7980
+ /** @description provider pages account.manageSubscription opens, first is the default: portal, update_payment, cancel */
7981
+ manage_pages: ("portal" | "update_payment" | "cancel")[];
7982
+ /** @description the provider page that renews the license by resuming its paused subscription; the provider charges at once */
7983
+ renew_page: ("portal" | "update_payment" | "cancel") | null;
7624
7984
  } | null;
7625
7985
  latest_release: {
7626
7986
  version: string;
@@ -7930,6 +8290,11 @@ export interface operations {
7930
8290
  "application/json": {
7931
8291
  /** Format: uri */
7932
8292
  return_url?: string;
8293
+ /**
8294
+ * @description one of the subscription's manage_pages; the first one when absent
8295
+ * @enum {string}
8296
+ */
8297
+ page?: "portal" | "update_payment" | "cancel";
7933
8298
  };
7934
8299
  };
7935
8300
  };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@ownkeyhq/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
+ "license": "MIT",
4
5
  "type": "module",
5
6
  "engines": {
6
7
  "node": ">=22.16"