integrate-sdk 0.8.70-dev.0 → 0.8.73-dev.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.
@@ -2859,7 +2859,7 @@ function linearIntegration(config = {}) {
2859
2859
  provider: "linear",
2860
2860
  clientId: config.clientId ?? getEnv("LINEAR_CLIENT_ID"),
2861
2861
  clientSecret: config.clientSecret ?? getEnv("LINEAR_CLIENT_SECRET"),
2862
- scopes: config.scopes || ["read", "write", "issues:create"],
2862
+ scopes: config.scopes || ["read", "write", "issues:create", "comments:create"],
2863
2863
  redirectUri: config.redirectUri,
2864
2864
  config: {
2865
2865
  ...config
@@ -2888,11 +2888,35 @@ var init_linear = __esm(() => {
2888
2888
  "linear_list_issues",
2889
2889
  "linear_get_issue",
2890
2890
  "linear_update_issue",
2891
- "linear_list_projects",
2892
- "linear_list_teams",
2891
+ "linear_archive_issue",
2892
+ "linear_delete_issue",
2893
+ "linear_search_issues",
2893
2894
  "linear_add_comment",
2895
+ "linear_list_users",
2896
+ "linear_get_user",
2897
+ "linear_list_teams",
2898
+ "linear_list_workflow_states",
2899
+ "linear_create_workflow_state",
2900
+ "linear_list_projects",
2901
+ "linear_get_project",
2902
+ "linear_create_project",
2903
+ "linear_update_project",
2904
+ "linear_list_cycles",
2905
+ "linear_get_cycle",
2906
+ "linear_create_cycle",
2907
+ "linear_update_cycle",
2894
2908
  "linear_list_labels",
2895
- "linear_search_issues"
2909
+ "linear_create_issue_relation",
2910
+ "linear_delete_issue_relation",
2911
+ "linear_list_documents",
2912
+ "linear_get_document",
2913
+ "linear_create_document",
2914
+ "linear_update_document",
2915
+ "linear_list_initiatives",
2916
+ "linear_get_initiative",
2917
+ "linear_create_initiative",
2918
+ "linear_create_attachment",
2919
+ "linear_create_project_update"
2896
2920
  ];
2897
2921
  });
2898
2922
 
@@ -3499,11 +3523,29 @@ function polarIntegration(config = {}) {
3499
3523
  provider: "polar",
3500
3524
  clientId: config.clientId ?? getEnv("POLAR_CLIENT_ID"),
3501
3525
  clientSecret: config.clientSecret ?? getEnv("POLAR_CLIENT_SECRET"),
3502
- scopes: config.scopes || ["products:read", "subscriptions:read", "customers:read", "orders:read", "benefits:read"],
3526
+ scopes: config.scopes || [
3527
+ "openid",
3528
+ "products:read",
3529
+ "products:write",
3530
+ "subscriptions:read",
3531
+ "subscriptions:write",
3532
+ "customers:read",
3533
+ "customers:write",
3534
+ "orders:read",
3535
+ "benefits:read",
3536
+ "benefits:write",
3537
+ "license_keys:read",
3538
+ "license_keys:write",
3539
+ "checkout_links:read",
3540
+ "checkout_links:write",
3541
+ "discounts:read",
3542
+ "discounts:write",
3543
+ "metrics:read",
3544
+ "organizations:read"
3545
+ ],
3503
3546
  redirectUri: config.redirectUri,
3504
3547
  config: {
3505
- apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh",
3506
- ...config
3548
+ apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh"
3507
3549
  }
3508
3550
  };
3509
3551
  return {
@@ -3527,13 +3569,39 @@ var init_polar = __esm(() => {
3527
3569
  POLAR_TOOLS = [
3528
3570
  "polar_list_products",
3529
3571
  "polar_get_product",
3572
+ "polar_create_product",
3573
+ "polar_update_product",
3530
3574
  "polar_list_subscriptions",
3531
3575
  "polar_get_subscription",
3576
+ "polar_update_subscription",
3577
+ "polar_revoke_subscription",
3532
3578
  "polar_list_customers",
3533
3579
  "polar_get_customer",
3580
+ "polar_create_customer",
3581
+ "polar_update_customer",
3582
+ "polar_delete_customer",
3583
+ "polar_get_customer_state",
3534
3584
  "polar_list_orders",
3535
3585
  "polar_get_order",
3536
- "polar_list_benefits"
3586
+ "polar_get_order_invoice",
3587
+ "polar_list_benefits",
3588
+ "polar_get_benefit",
3589
+ "polar_create_benefit",
3590
+ "polar_update_benefit",
3591
+ "polar_list_discounts",
3592
+ "polar_get_discount",
3593
+ "polar_create_discount",
3594
+ "polar_delete_discount",
3595
+ "polar_list_checkout_links",
3596
+ "polar_get_checkout_link",
3597
+ "polar_create_checkout_link",
3598
+ "polar_list_license_keys",
3599
+ "polar_get_license_key",
3600
+ "polar_validate_license_key",
3601
+ "polar_activate_license_key",
3602
+ "polar_get_metrics",
3603
+ "polar_list_organizations",
3604
+ "polar_get_organization"
3537
3605
  ];
3538
3606
  });
3539
3607
 
@@ -11487,9 +11555,20 @@ class OAuthHandler {
11487
11555
  if (redirectUri) {
11488
11556
  url.searchParams.set("redirect_uri", redirectUri);
11489
11557
  }
11558
+ const OAUTH_FIELDS = new Set([
11559
+ "clientId",
11560
+ "clientSecret",
11561
+ "scopes",
11562
+ "redirectUri",
11563
+ "client_id",
11564
+ "client_secret",
11565
+ "scope",
11566
+ "redirect_uri",
11567
+ "provider"
11568
+ ]);
11490
11569
  if (providerConfig.config) {
11491
11570
  for (const [key, value] of Object.entries(providerConfig.config)) {
11492
- if (value !== undefined && value !== null) {
11571
+ if (value !== undefined && value !== null && !OAUTH_FIELDS.has(key)) {
11493
11572
  url.searchParams.set(key, String(value));
11494
11573
  }
11495
11574
  }
@@ -2859,7 +2859,7 @@ function linearIntegration(config = {}) {
2859
2859
  provider: "linear",
2860
2860
  clientId: config.clientId ?? getEnv("LINEAR_CLIENT_ID"),
2861
2861
  clientSecret: config.clientSecret ?? getEnv("LINEAR_CLIENT_SECRET"),
2862
- scopes: config.scopes || ["read", "write", "issues:create"],
2862
+ scopes: config.scopes || ["read", "write", "issues:create", "comments:create"],
2863
2863
  redirectUri: config.redirectUri,
2864
2864
  config: {
2865
2865
  ...config
@@ -2888,11 +2888,35 @@ var init_linear = __esm(() => {
2888
2888
  "linear_list_issues",
2889
2889
  "linear_get_issue",
2890
2890
  "linear_update_issue",
2891
- "linear_list_projects",
2892
- "linear_list_teams",
2891
+ "linear_archive_issue",
2892
+ "linear_delete_issue",
2893
+ "linear_search_issues",
2893
2894
  "linear_add_comment",
2895
+ "linear_list_users",
2896
+ "linear_get_user",
2897
+ "linear_list_teams",
2898
+ "linear_list_workflow_states",
2899
+ "linear_create_workflow_state",
2900
+ "linear_list_projects",
2901
+ "linear_get_project",
2902
+ "linear_create_project",
2903
+ "linear_update_project",
2904
+ "linear_list_cycles",
2905
+ "linear_get_cycle",
2906
+ "linear_create_cycle",
2907
+ "linear_update_cycle",
2894
2908
  "linear_list_labels",
2895
- "linear_search_issues"
2909
+ "linear_create_issue_relation",
2910
+ "linear_delete_issue_relation",
2911
+ "linear_list_documents",
2912
+ "linear_get_document",
2913
+ "linear_create_document",
2914
+ "linear_update_document",
2915
+ "linear_list_initiatives",
2916
+ "linear_get_initiative",
2917
+ "linear_create_initiative",
2918
+ "linear_create_attachment",
2919
+ "linear_create_project_update"
2896
2920
  ];
2897
2921
  });
2898
2922
 
@@ -3499,11 +3523,29 @@ function polarIntegration(config = {}) {
3499
3523
  provider: "polar",
3500
3524
  clientId: config.clientId ?? getEnv("POLAR_CLIENT_ID"),
3501
3525
  clientSecret: config.clientSecret ?? getEnv("POLAR_CLIENT_SECRET"),
3502
- scopes: config.scopes || ["products:read", "subscriptions:read", "customers:read", "orders:read", "benefits:read"],
3526
+ scopes: config.scopes || [
3527
+ "openid",
3528
+ "products:read",
3529
+ "products:write",
3530
+ "subscriptions:read",
3531
+ "subscriptions:write",
3532
+ "customers:read",
3533
+ "customers:write",
3534
+ "orders:read",
3535
+ "benefits:read",
3536
+ "benefits:write",
3537
+ "license_keys:read",
3538
+ "license_keys:write",
3539
+ "checkout_links:read",
3540
+ "checkout_links:write",
3541
+ "discounts:read",
3542
+ "discounts:write",
3543
+ "metrics:read",
3544
+ "organizations:read"
3545
+ ],
3503
3546
  redirectUri: config.redirectUri,
3504
3547
  config: {
3505
- apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh",
3506
- ...config
3548
+ apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh"
3507
3549
  }
3508
3550
  };
3509
3551
  return {
@@ -3527,13 +3569,39 @@ var init_polar = __esm(() => {
3527
3569
  POLAR_TOOLS = [
3528
3570
  "polar_list_products",
3529
3571
  "polar_get_product",
3572
+ "polar_create_product",
3573
+ "polar_update_product",
3530
3574
  "polar_list_subscriptions",
3531
3575
  "polar_get_subscription",
3576
+ "polar_update_subscription",
3577
+ "polar_revoke_subscription",
3532
3578
  "polar_list_customers",
3533
3579
  "polar_get_customer",
3580
+ "polar_create_customer",
3581
+ "polar_update_customer",
3582
+ "polar_delete_customer",
3583
+ "polar_get_customer_state",
3534
3584
  "polar_list_orders",
3535
3585
  "polar_get_order",
3536
- "polar_list_benefits"
3586
+ "polar_get_order_invoice",
3587
+ "polar_list_benefits",
3588
+ "polar_get_benefit",
3589
+ "polar_create_benefit",
3590
+ "polar_update_benefit",
3591
+ "polar_list_discounts",
3592
+ "polar_get_discount",
3593
+ "polar_create_discount",
3594
+ "polar_delete_discount",
3595
+ "polar_list_checkout_links",
3596
+ "polar_get_checkout_link",
3597
+ "polar_create_checkout_link",
3598
+ "polar_list_license_keys",
3599
+ "polar_get_license_key",
3600
+ "polar_validate_license_key",
3601
+ "polar_activate_license_key",
3602
+ "polar_get_metrics",
3603
+ "polar_list_organizations",
3604
+ "polar_get_organization"
3537
3605
  ];
3538
3606
  });
3539
3607
 
@@ -11487,9 +11555,20 @@ class OAuthHandler {
11487
11555
  if (redirectUri) {
11488
11556
  url.searchParams.set("redirect_uri", redirectUri);
11489
11557
  }
11558
+ const OAUTH_FIELDS = new Set([
11559
+ "clientId",
11560
+ "clientSecret",
11561
+ "scopes",
11562
+ "redirectUri",
11563
+ "client_id",
11564
+ "client_secret",
11565
+ "scope",
11566
+ "redirect_uri",
11567
+ "provider"
11568
+ ]);
11490
11569
  if (providerConfig.config) {
11491
11570
  for (const [key, value] of Object.entries(providerConfig.config)) {
11492
- if (value !== undefined && value !== null) {
11571
+ if (value !== undefined && value !== null && !OAUTH_FIELDS.has(key)) {
11493
11572
  url.searchParams.set(key, String(value));
11494
11573
  }
11495
11574
  }
package/dist/index.js CHANGED
@@ -3250,7 +3250,7 @@ function linearIntegration(config = {}) {
3250
3250
  provider: "linear",
3251
3251
  clientId: config.clientId ?? getEnv("LINEAR_CLIENT_ID"),
3252
3252
  clientSecret: config.clientSecret ?? getEnv("LINEAR_CLIENT_SECRET"),
3253
- scopes: config.scopes || ["read", "write", "issues:create"],
3253
+ scopes: config.scopes || ["read", "write", "issues:create", "comments:create"],
3254
3254
  redirectUri: config.redirectUri,
3255
3255
  config: {
3256
3256
  ...config
@@ -3279,11 +3279,35 @@ var init_linear = __esm(() => {
3279
3279
  "linear_list_issues",
3280
3280
  "linear_get_issue",
3281
3281
  "linear_update_issue",
3282
- "linear_list_projects",
3283
- "linear_list_teams",
3282
+ "linear_archive_issue",
3283
+ "linear_delete_issue",
3284
+ "linear_search_issues",
3284
3285
  "linear_add_comment",
3286
+ "linear_list_users",
3287
+ "linear_get_user",
3288
+ "linear_list_teams",
3289
+ "linear_list_workflow_states",
3290
+ "linear_create_workflow_state",
3291
+ "linear_list_projects",
3292
+ "linear_get_project",
3293
+ "linear_create_project",
3294
+ "linear_update_project",
3295
+ "linear_list_cycles",
3296
+ "linear_get_cycle",
3297
+ "linear_create_cycle",
3298
+ "linear_update_cycle",
3285
3299
  "linear_list_labels",
3286
- "linear_search_issues"
3300
+ "linear_create_issue_relation",
3301
+ "linear_delete_issue_relation",
3302
+ "linear_list_documents",
3303
+ "linear_get_document",
3304
+ "linear_create_document",
3305
+ "linear_update_document",
3306
+ "linear_list_initiatives",
3307
+ "linear_get_initiative",
3308
+ "linear_create_initiative",
3309
+ "linear_create_attachment",
3310
+ "linear_create_project_update"
3287
3311
  ];
3288
3312
  });
3289
3313
 
@@ -3890,11 +3914,29 @@ function polarIntegration(config = {}) {
3890
3914
  provider: "polar",
3891
3915
  clientId: config.clientId ?? getEnv("POLAR_CLIENT_ID"),
3892
3916
  clientSecret: config.clientSecret ?? getEnv("POLAR_CLIENT_SECRET"),
3893
- scopes: config.scopes || ["products:read", "subscriptions:read", "customers:read", "orders:read", "benefits:read"],
3917
+ scopes: config.scopes || [
3918
+ "openid",
3919
+ "products:read",
3920
+ "products:write",
3921
+ "subscriptions:read",
3922
+ "subscriptions:write",
3923
+ "customers:read",
3924
+ "customers:write",
3925
+ "orders:read",
3926
+ "benefits:read",
3927
+ "benefits:write",
3928
+ "license_keys:read",
3929
+ "license_keys:write",
3930
+ "checkout_links:read",
3931
+ "checkout_links:write",
3932
+ "discounts:read",
3933
+ "discounts:write",
3934
+ "metrics:read",
3935
+ "organizations:read"
3936
+ ],
3894
3937
  redirectUri: config.redirectUri,
3895
3938
  config: {
3896
- apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh",
3897
- ...config
3939
+ apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh"
3898
3940
  }
3899
3941
  };
3900
3942
  return {
@@ -3918,13 +3960,39 @@ var init_polar = __esm(() => {
3918
3960
  POLAR_TOOLS = [
3919
3961
  "polar_list_products",
3920
3962
  "polar_get_product",
3963
+ "polar_create_product",
3964
+ "polar_update_product",
3921
3965
  "polar_list_subscriptions",
3922
3966
  "polar_get_subscription",
3967
+ "polar_update_subscription",
3968
+ "polar_revoke_subscription",
3923
3969
  "polar_list_customers",
3924
3970
  "polar_get_customer",
3971
+ "polar_create_customer",
3972
+ "polar_update_customer",
3973
+ "polar_delete_customer",
3974
+ "polar_get_customer_state",
3925
3975
  "polar_list_orders",
3926
3976
  "polar_get_order",
3927
- "polar_list_benefits"
3977
+ "polar_get_order_invoice",
3978
+ "polar_list_benefits",
3979
+ "polar_get_benefit",
3980
+ "polar_create_benefit",
3981
+ "polar_update_benefit",
3982
+ "polar_list_discounts",
3983
+ "polar_get_discount",
3984
+ "polar_create_discount",
3985
+ "polar_delete_discount",
3986
+ "polar_list_checkout_links",
3987
+ "polar_get_checkout_link",
3988
+ "polar_create_checkout_link",
3989
+ "polar_list_license_keys",
3990
+ "polar_get_license_key",
3991
+ "polar_validate_license_key",
3992
+ "polar_activate_license_key",
3993
+ "polar_get_metrics",
3994
+ "polar_list_organizations",
3995
+ "polar_get_organization"
3928
3996
  ];
3929
3997
  });
3930
3998
 
@@ -11866,9 +11934,20 @@ class OAuthHandler {
11866
11934
  if (redirectUri) {
11867
11935
  url.searchParams.set("redirect_uri", redirectUri);
11868
11936
  }
11937
+ const OAUTH_FIELDS = new Set([
11938
+ "clientId",
11939
+ "clientSecret",
11940
+ "scopes",
11941
+ "redirectUri",
11942
+ "client_id",
11943
+ "client_secret",
11944
+ "scope",
11945
+ "redirect_uri",
11946
+ "provider"
11947
+ ]);
11869
11948
  if (providerConfig.config) {
11870
11949
  for (const [key, value] of Object.entries(providerConfig.config)) {
11871
- if (value !== undefined && value !== null) {
11950
+ if (value !== undefined && value !== null && !OAUTH_FIELDS.has(key)) {
11872
11951
  url.searchParams.set(key, String(value));
11873
11952
  }
11874
11953
  }
package/dist/oauth.js CHANGED
@@ -3072,7 +3072,7 @@ function linearIntegration(config = {}) {
3072
3072
  provider: "linear",
3073
3073
  clientId: config.clientId ?? getEnv("LINEAR_CLIENT_ID"),
3074
3074
  clientSecret: config.clientSecret ?? getEnv("LINEAR_CLIENT_SECRET"),
3075
- scopes: config.scopes || ["read", "write", "issues:create"],
3075
+ scopes: config.scopes || ["read", "write", "issues:create", "comments:create"],
3076
3076
  redirectUri: config.redirectUri,
3077
3077
  config: {
3078
3078
  ...config
@@ -3101,11 +3101,35 @@ var init_linear = __esm(() => {
3101
3101
  "linear_list_issues",
3102
3102
  "linear_get_issue",
3103
3103
  "linear_update_issue",
3104
- "linear_list_projects",
3105
- "linear_list_teams",
3104
+ "linear_archive_issue",
3105
+ "linear_delete_issue",
3106
+ "linear_search_issues",
3106
3107
  "linear_add_comment",
3108
+ "linear_list_users",
3109
+ "linear_get_user",
3110
+ "linear_list_teams",
3111
+ "linear_list_workflow_states",
3112
+ "linear_create_workflow_state",
3113
+ "linear_list_projects",
3114
+ "linear_get_project",
3115
+ "linear_create_project",
3116
+ "linear_update_project",
3117
+ "linear_list_cycles",
3118
+ "linear_get_cycle",
3119
+ "linear_create_cycle",
3120
+ "linear_update_cycle",
3107
3121
  "linear_list_labels",
3108
- "linear_search_issues"
3122
+ "linear_create_issue_relation",
3123
+ "linear_delete_issue_relation",
3124
+ "linear_list_documents",
3125
+ "linear_get_document",
3126
+ "linear_create_document",
3127
+ "linear_update_document",
3128
+ "linear_list_initiatives",
3129
+ "linear_get_initiative",
3130
+ "linear_create_initiative",
3131
+ "linear_create_attachment",
3132
+ "linear_create_project_update"
3109
3133
  ];
3110
3134
  });
3111
3135
 
@@ -3712,11 +3736,29 @@ function polarIntegration(config = {}) {
3712
3736
  provider: "polar",
3713
3737
  clientId: config.clientId ?? getEnv("POLAR_CLIENT_ID"),
3714
3738
  clientSecret: config.clientSecret ?? getEnv("POLAR_CLIENT_SECRET"),
3715
- scopes: config.scopes || ["products:read", "subscriptions:read", "customers:read", "orders:read", "benefits:read"],
3739
+ scopes: config.scopes || [
3740
+ "openid",
3741
+ "products:read",
3742
+ "products:write",
3743
+ "subscriptions:read",
3744
+ "subscriptions:write",
3745
+ "customers:read",
3746
+ "customers:write",
3747
+ "orders:read",
3748
+ "benefits:read",
3749
+ "benefits:write",
3750
+ "license_keys:read",
3751
+ "license_keys:write",
3752
+ "checkout_links:read",
3753
+ "checkout_links:write",
3754
+ "discounts:read",
3755
+ "discounts:write",
3756
+ "metrics:read",
3757
+ "organizations:read"
3758
+ ],
3716
3759
  redirectUri: config.redirectUri,
3717
3760
  config: {
3718
- apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh",
3719
- ...config
3761
+ apiBaseUrl: config.apiBaseUrl || "https://api.polar.sh"
3720
3762
  }
3721
3763
  };
3722
3764
  return {
@@ -3740,13 +3782,39 @@ var init_polar = __esm(() => {
3740
3782
  POLAR_TOOLS = [
3741
3783
  "polar_list_products",
3742
3784
  "polar_get_product",
3785
+ "polar_create_product",
3786
+ "polar_update_product",
3743
3787
  "polar_list_subscriptions",
3744
3788
  "polar_get_subscription",
3789
+ "polar_update_subscription",
3790
+ "polar_revoke_subscription",
3745
3791
  "polar_list_customers",
3746
3792
  "polar_get_customer",
3793
+ "polar_create_customer",
3794
+ "polar_update_customer",
3795
+ "polar_delete_customer",
3796
+ "polar_get_customer_state",
3747
3797
  "polar_list_orders",
3748
3798
  "polar_get_order",
3749
- "polar_list_benefits"
3799
+ "polar_get_order_invoice",
3800
+ "polar_list_benefits",
3801
+ "polar_get_benefit",
3802
+ "polar_create_benefit",
3803
+ "polar_update_benefit",
3804
+ "polar_list_discounts",
3805
+ "polar_get_discount",
3806
+ "polar_create_discount",
3807
+ "polar_delete_discount",
3808
+ "polar_list_checkout_links",
3809
+ "polar_get_checkout_link",
3810
+ "polar_create_checkout_link",
3811
+ "polar_list_license_keys",
3812
+ "polar_get_license_key",
3813
+ "polar_validate_license_key",
3814
+ "polar_activate_license_key",
3815
+ "polar_get_metrics",
3816
+ "polar_list_organizations",
3817
+ "polar_get_organization"
3750
3818
  ];
3751
3819
  });
3752
3820
 
@@ -11700,9 +11768,20 @@ class OAuthHandler {
11700
11768
  if (redirectUri) {
11701
11769
  url.searchParams.set("redirect_uri", redirectUri);
11702
11770
  }
11771
+ const OAUTH_FIELDS = new Set([
11772
+ "clientId",
11773
+ "clientSecret",
11774
+ "scopes",
11775
+ "redirectUri",
11776
+ "client_id",
11777
+ "client_secret",
11778
+ "scope",
11779
+ "redirect_uri",
11780
+ "provider"
11781
+ ]);
11703
11782
  if (providerConfig.config) {
11704
11783
  for (const [key, value] of Object.entries(providerConfig.config)) {
11705
- if (value !== undefined && value !== null) {
11784
+ if (value !== undefined && value !== null && !OAUTH_FIELDS.has(key)) {
11706
11785
  url.searchParams.set(key, String(value));
11707
11786
  }
11708
11787
  }