@insurup/sdk 0.1.8 → 0.1.10

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.8",
61
+ version: "0.1.10",
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",
@@ -2821,6 +2821,7 @@ var InsurUpAgentUserClient = class {
2821
2821
  }
2822
2822
  const fields = requestOptions?.select ?? import_contracts.ALL_AGENT_USER_FIELDS;
2823
2823
  const fieldSelection = (0, import_contracts2.buildFieldSelection)(fields);
2824
+ const hasFieldSelection = fieldSelection.length > 0;
2824
2825
  const query = `
2825
2826
  query GetAgentUsers(
2826
2827
  $first: Int
@@ -2847,12 +2848,12 @@ var InsurUpAgentUserClient = class {
2847
2848
  endCursor
2848
2849
  }
2849
2850
  totalCount
2850
- edges {
2851
+ ${hasFieldSelection ? `edges {
2851
2852
  cursor
2852
2853
  node {
2853
2854
  ${fieldSelection}
2854
2855
  }
2855
- }
2856
+ }` : ""}
2856
2857
  }
2857
2858
  }
2858
2859
  `;
@@ -3306,6 +3307,7 @@ var InsurUpCustomerClient = class {
3306
3307
  }
3307
3308
  const fields = requestOptions?.select ?? import_contracts3.ALL_CUSTOMER_FIELDS;
3308
3309
  const fieldSelection = (0, import_contracts4.buildFieldSelection)(fields);
3310
+ const hasFieldSelection = fieldSelection.length > 0;
3309
3311
  const includeTotalCount = requestOptions?.includeTotalCount !== false;
3310
3312
  const query = `
3311
3313
  query GetCustomers(
@@ -3333,12 +3335,12 @@ var InsurUpCustomerClient = class {
3333
3335
  endCursor
3334
3336
  }
3335
3337
  ${includeTotalCount ? "totalCount" : ""}
3336
- edges {
3338
+ ${hasFieldSelection ? `edges {
3337
3339
  cursor
3338
3340
  node {
3339
3341
  ${fieldSelection}
3340
3342
  }
3341
- }
3343
+ }` : ""}
3342
3344
  }
3343
3345
  }
3344
3346
  `;
@@ -4033,6 +4035,7 @@ var InsurUpPolicyClient = class {
4033
4035
  }
4034
4036
  const fields = requestOptions?.select ?? import_contracts5.ALL_POLICY_FIELDS;
4035
4037
  const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
4038
+ const hasFieldSelection = fieldSelection.length > 0;
4036
4039
  const includeTotalCount = requestOptions?.includeTotalCount !== false;
4037
4040
  const query = `
4038
4041
  query GetPolicies(
@@ -4060,12 +4063,12 @@ var InsurUpPolicyClient = class {
4060
4063
  endCursor
4061
4064
  }
4062
4065
  ${includeTotalCount ? "totalCount" : ""}
4063
- edges {
4066
+ ${hasFieldSelection ? `edges {
4064
4067
  cursor
4065
4068
  node {
4066
4069
  ${fieldSelection}
4067
4070
  }
4068
- }
4071
+ }` : ""}
4069
4072
  }
4070
4073
  }
4071
4074
  `;
@@ -4114,6 +4117,7 @@ var InsurUpPolicyClient = class {
4114
4117
  }
4115
4118
  const fields = requestOptions?.select ?? import_contracts6.ALL_POLICY_TRANSFER_FIELDS;
4116
4119
  const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
4120
+ const hasFieldSelection = fieldSelection.length > 0;
4117
4121
  const query = `
4118
4122
  query GetPolicyTransfers(
4119
4123
  $first: Int
@@ -4140,12 +4144,12 @@ var InsurUpPolicyClient = class {
4140
4144
  endCursor
4141
4145
  }
4142
4146
  totalCount
4143
- edges {
4147
+ ${hasFieldSelection ? `edges {
4144
4148
  cursor
4145
4149
  node {
4146
4150
  ${fieldSelection}
4147
4151
  }
4148
- }
4152
+ }` : ""}
4149
4153
  }
4150
4154
  }
4151
4155
  `;
@@ -4194,6 +4198,7 @@ var InsurUpPolicyClient = class {
4194
4198
  }
4195
4199
  const fields = requestOptions?.select ?? import_contracts7.ALL_FILE_POLICY_TRANSFER_FIELDS;
4196
4200
  const fieldSelection = (0, import_contracts8.buildFieldSelection)(fields);
4201
+ const hasFieldSelection = fieldSelection.length > 0;
4197
4202
  const query = `
4198
4203
  query GetFilePolicyTransfers(
4199
4204
  $first: Int
@@ -4220,12 +4225,12 @@ var InsurUpPolicyClient = class {
4220
4225
  endCursor
4221
4226
  }
4222
4227
  totalCount
4223
- edges {
4228
+ ${hasFieldSelection ? `edges {
4224
4229
  cursor
4225
4230
  node {
4226
4231
  ${fieldSelection}
4227
4232
  }
4228
- }
4233
+ }` : ""}
4229
4234
  }
4230
4235
  }
4231
4236
  `;
@@ -4557,6 +4562,7 @@ var InsurUpCaseClient = class {
4557
4562
  }
4558
4563
  const fields = requestOptions?.select ?? import_contracts9.ALL_CASE_FIELDS;
4559
4564
  const fieldSelection = (0, import_contracts10.buildFieldSelection)(fields);
4565
+ const hasFieldSelection = fieldSelection.length > 0;
4560
4566
  const query = `
4561
4567
  query GetCases(
4562
4568
  $first: Int
@@ -4583,12 +4589,12 @@ var InsurUpCaseClient = class {
4583
4589
  endCursor
4584
4590
  }
4585
4591
  totalCount
4586
- edges {
4592
+ ${hasFieldSelection ? `edges {
4587
4593
  cursor
4588
4594
  node {
4589
4595
  ${fieldSelection}
4590
4596
  }
4591
- }
4597
+ }` : ""}
4592
4598
  }
4593
4599
  }
4594
4600
  `;
@@ -4751,6 +4757,7 @@ var InsurUpWebhookClient = class {
4751
4757
  }
4752
4758
  const fields = requestOptions?.select ?? import_contracts11.ALL_WEBHOOK_DELIVERY_FIELDS;
4753
4759
  const fieldSelection = (0, import_contracts12.buildFieldSelection)(fields);
4760
+ const hasFieldSelection = fieldSelection.length > 0;
4754
4761
  const query = `
4755
4762
  query GetWebhookDeliveries(
4756
4763
  $first: Int
@@ -4777,12 +4784,12 @@ var InsurUpWebhookClient = class {
4777
4784
  endCursor
4778
4785
  }
4779
4786
  totalCount
4780
- edges {
4787
+ ${hasFieldSelection ? `edges {
4781
4788
  cursor
4782
4789
  node {
4783
4790
  ${fieldSelection}
4784
4791
  }
4785
- }
4792
+ }` : ""}
4786
4793
  }
4787
4794
  }
4788
4795
  `;
@@ -5426,6 +5433,7 @@ var InsurUpProposalClient = class {
5426
5433
  }
5427
5434
  const fields = requestOptions?.select ?? import_contracts13.ALL_PROPOSAL_FIELDS;
5428
5435
  const fieldSelection = (0, import_contracts14.buildFieldSelection)(fields);
5436
+ const hasFieldSelection = fieldSelection.length > 0;
5429
5437
  const query = `
5430
5438
  query GetProposals(
5431
5439
  $first: Int
@@ -5452,12 +5460,12 @@ var InsurUpProposalClient = class {
5452
5460
  endCursor
5453
5461
  }
5454
5462
  totalCount
5455
- edges {
5463
+ ${hasFieldSelection ? `edges {
5456
5464
  cursor
5457
5465
  node {
5458
5466
  ${fieldSelection}
5459
5467
  }
5460
- }
5468
+ }` : ""}
5461
5469
  }
5462
5470
  }
5463
5471
  `;