@insurup/sdk 0.1.7 → 0.1.9

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
@@ -58,7 +58,7 @@ module.exports = __toCommonJS(index_exports);
58
58
  // package.json
59
59
  var package_default = {
60
60
  name: "@insurup/sdk",
61
- version: "0.1.7",
61
+ version: "0.1.9",
62
62
  description: "Type-safe TypeScript SDK for the InsurUp insurance platform with GraphQL support. Tree-shakeable, works everywhere.",
63
63
  keywords: [
64
64
  "insurup",
@@ -97,14 +97,12 @@ var package_default = {
97
97
  exports: {
98
98
  ".": {
99
99
  types: "./dist/index.d.ts",
100
- development: "./src/index.ts",
101
100
  import: "./dist/index.js",
102
101
  require: "./dist/index.cjs",
103
102
  default: "./dist/index.js"
104
103
  },
105
104
  "./browser": {
106
105
  types: "./dist/index.d.ts",
107
- development: "./src/index.ts",
108
106
  import: "./dist/index.browser.js",
109
107
  default: "./dist/index.browser.js"
110
108
  }
@@ -2823,6 +2821,7 @@ var InsurUpAgentUserClient = class {
2823
2821
  }
2824
2822
  const fields = requestOptions?.select ?? import_contracts.ALL_AGENT_USER_FIELDS;
2825
2823
  const fieldSelection = (0, import_contracts2.buildFieldSelection)(fields);
2824
+ const hasFieldSelection = fieldSelection.length > 0;
2826
2825
  const query = `
2827
2826
  query GetAgentUsers(
2828
2827
  $first: Int
@@ -2849,12 +2848,12 @@ var InsurUpAgentUserClient = class {
2849
2848
  endCursor
2850
2849
  }
2851
2850
  totalCount
2852
- edges {
2851
+ ${hasFieldSelection ? `edges {
2853
2852
  cursor
2854
2853
  node {
2855
2854
  ${fieldSelection}
2856
2855
  }
2857
- }
2856
+ }` : ""}
2858
2857
  }
2859
2858
  }
2860
2859
  `;
@@ -3308,6 +3307,7 @@ var InsurUpCustomerClient = class {
3308
3307
  }
3309
3308
  const fields = requestOptions?.select ?? import_contracts3.ALL_CUSTOMER_FIELDS;
3310
3309
  const fieldSelection = (0, import_contracts4.buildFieldSelection)(fields);
3310
+ const hasFieldSelection = fieldSelection.length > 0;
3311
3311
  const includeTotalCount = requestOptions?.includeTotalCount !== false;
3312
3312
  const query = `
3313
3313
  query GetCustomers(
@@ -3335,12 +3335,12 @@ var InsurUpCustomerClient = class {
3335
3335
  endCursor
3336
3336
  }
3337
3337
  ${includeTotalCount ? "totalCount" : ""}
3338
- edges {
3338
+ ${hasFieldSelection ? `edges {
3339
3339
  cursor
3340
3340
  node {
3341
3341
  ${fieldSelection}
3342
3342
  }
3343
- }
3343
+ }` : ""}
3344
3344
  }
3345
3345
  }
3346
3346
  `;
@@ -4035,6 +4035,7 @@ var InsurUpPolicyClient = class {
4035
4035
  }
4036
4036
  const fields = requestOptions?.select ?? import_contracts5.ALL_POLICY_FIELDS;
4037
4037
  const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
4038
+ const hasFieldSelection = fieldSelection.length > 0;
4038
4039
  const includeTotalCount = requestOptions?.includeTotalCount !== false;
4039
4040
  const query = `
4040
4041
  query GetPolicies(
@@ -4062,12 +4063,12 @@ var InsurUpPolicyClient = class {
4062
4063
  endCursor
4063
4064
  }
4064
4065
  ${includeTotalCount ? "totalCount" : ""}
4065
- edges {
4066
+ ${hasFieldSelection ? `edges {
4066
4067
  cursor
4067
4068
  node {
4068
4069
  ${fieldSelection}
4069
4070
  }
4070
- }
4071
+ }` : ""}
4071
4072
  }
4072
4073
  }
4073
4074
  `;
@@ -4116,6 +4117,7 @@ var InsurUpPolicyClient = class {
4116
4117
  }
4117
4118
  const fields = requestOptions?.select ?? import_contracts6.ALL_POLICY_TRANSFER_FIELDS;
4118
4119
  const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
4120
+ const hasFieldSelection = fieldSelection.length > 0;
4119
4121
  const query = `
4120
4122
  query GetPolicyTransfers(
4121
4123
  $first: Int
@@ -4142,12 +4144,12 @@ var InsurUpPolicyClient = class {
4142
4144
  endCursor
4143
4145
  }
4144
4146
  totalCount
4145
- edges {
4147
+ ${hasFieldSelection ? `edges {
4146
4148
  cursor
4147
4149
  node {
4148
4150
  ${fieldSelection}
4149
4151
  }
4150
- }
4152
+ }` : ""}
4151
4153
  }
4152
4154
  }
4153
4155
  `;
@@ -4196,6 +4198,7 @@ var InsurUpPolicyClient = class {
4196
4198
  }
4197
4199
  const fields = requestOptions?.select ?? import_contracts7.ALL_FILE_POLICY_TRANSFER_FIELDS;
4198
4200
  const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
4201
+ const hasFieldSelection = fieldSelection.length > 0;
4199
4202
  const query = `
4200
4203
  query GetFilePolicyTransfers(
4201
4204
  $first: Int
@@ -4222,12 +4225,12 @@ var InsurUpPolicyClient = class {
4222
4225
  endCursor
4223
4226
  }
4224
4227
  totalCount
4225
- edges {
4228
+ ${hasFieldSelection ? `edges {
4226
4229
  cursor
4227
4230
  node {
4228
4231
  ${fieldSelection}
4229
4232
  }
4230
- }
4233
+ }` : ""}
4231
4234
  }
4232
4235
  }
4233
4236
  `;
@@ -4559,6 +4562,7 @@ var InsurUpCaseClient = class {
4559
4562
  }
4560
4563
  const fields = requestOptions?.select ?? import_contracts9.ALL_CASE_FIELDS;
4561
4564
  const fieldSelection = (0, import_contracts10.buildFieldSelection)(fields);
4565
+ const hasFieldSelection = fieldSelection.length > 0;
4562
4566
  const query = `
4563
4567
  query GetCases(
4564
4568
  $first: Int
@@ -4585,12 +4589,12 @@ var InsurUpCaseClient = class {
4585
4589
  endCursor
4586
4590
  }
4587
4591
  totalCount
4588
- edges {
4592
+ ${hasFieldSelection ? `edges {
4589
4593
  cursor
4590
4594
  node {
4591
4595
  ${fieldSelection}
4592
4596
  }
4593
- }
4597
+ }` : ""}
4594
4598
  }
4595
4599
  }
4596
4600
  `;
@@ -4753,6 +4757,7 @@ var InsurUpWebhookClient = class {
4753
4757
  }
4754
4758
  const fields = requestOptions?.select ?? import_contracts11.ALL_WEBHOOK_DELIVERY_FIELDS;
4755
4759
  const fieldSelection = (0, import_contracts12.buildFieldSelection)(fields);
4760
+ const hasFieldSelection = fieldSelection.length > 0;
4756
4761
  const query = `
4757
4762
  query GetWebhookDeliveries(
4758
4763
  $first: Int
@@ -4779,12 +4784,12 @@ var InsurUpWebhookClient = class {
4779
4784
  endCursor
4780
4785
  }
4781
4786
  totalCount
4782
- edges {
4787
+ ${hasFieldSelection ? `edges {
4783
4788
  cursor
4784
4789
  node {
4785
4790
  ${fieldSelection}
4786
4791
  }
4787
- }
4792
+ }` : ""}
4788
4793
  }
4789
4794
  }
4790
4795
  `;
@@ -5428,6 +5433,7 @@ var InsurUpProposalClient = class {
5428
5433
  }
5429
5434
  const fields = requestOptions?.select ?? import_contracts13.ALL_PROPOSAL_FIELDS;
5430
5435
  const fieldSelection = (0, import_contracts14.buildFieldSelection)(fields);
5436
+ const hasFieldSelection = fieldSelection.length > 0;
5431
5437
  const query = `
5432
5438
  query GetProposals(
5433
5439
  $first: Int
@@ -5454,12 +5460,12 @@ var InsurUpProposalClient = class {
5454
5460
  endCursor
5455
5461
  }
5456
5462
  totalCount
5457
- edges {
5463
+ ${hasFieldSelection ? `edges {
5458
5464
  cursor
5459
5465
  node {
5460
5466
  ${fieldSelection}
5461
5467
  }
5462
- }
5468
+ }` : ""}
5463
5469
  }
5464
5470
  }
5465
5471
  `;