datocms-plugin-sdk 0.3.1 → 0.3.2

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/types.json CHANGED
@@ -2060,7 +2060,7 @@
2060
2060
  "sources": [
2061
2061
  {
2062
2062
  "fileName": "types.ts",
2063
- "line": 766,
2063
+ "line": 795,
2064
2064
  "character": 12
2065
2065
  }
2066
2066
  ],
@@ -2082,7 +2082,7 @@
2082
2082
  "sources": [
2083
2083
  {
2084
2084
  "fileName": "types.ts",
2085
- "line": 817,
2085
+ "line": 848,
2086
2086
  "character": 2
2087
2087
  }
2088
2088
  ],
@@ -2098,7 +2098,7 @@
2098
2098
  "tags": [
2099
2099
  {
2100
2100
  "tag": "example",
2101
- "text": "\n const result = await sdk.openConfirm({\n title: 'Custom title',\n content:\n 'Lorem Ipsum is simply dummy text of the printing and typesetting industry',\n choices: [\n {\n label: 'Positive',\n value: 'positive',\n intent: 'positive',\n },\n {\n label: 'Negative',\n value: 'negative',\n intent: 'negative',\n },\n ],\n cancel: {\n label: 'Cancel',\n value: false,\n },\n });\n if (result) {\n sdk.notice(`Success! ${result}`);\n } else {\n sdk.alert('Cancelled!');\n }\n"
2101
+ "text": "\n const result = await ctx.openConfirm({\n title: 'Custom title',\n content:\n 'Lorem Ipsum is simply dummy text of the printing and typesetting industry',\n choices: [\n {\n label: 'Positive',\n value: 'positive',\n intent: 'positive',\n },\n {\n label: 'Negative',\n value: 'negative',\n intent: 'negative',\n },\n ],\n cancel: {\n label: 'Cancel',\n value: false,\n },\n });\n\n if (result) {\n ctx.notice(`Success! ${result}`);\n } else {\n ctx.alert('Cancelled!');\n }\n"
2102
2102
  }
2103
2103
  ]
2104
2104
  },
@@ -2138,7 +2138,7 @@
2138
2138
  "sources": [
2139
2139
  {
2140
2140
  "fileName": "types.ts",
2141
- "line": 784,
2141
+ "line": 814,
2142
2142
  "character": 2
2143
2143
  }
2144
2144
  ],
@@ -2154,7 +2154,7 @@
2154
2154
  "tags": [
2155
2155
  {
2156
2156
  "tag": "example",
2157
- "text": "\n const result = await sdk.openModal({\n id: 'regular',\n title: 'Custom title!',\n width: 'l',\n parameters: { foo: 'bar' },\n });\n if (result) {\n sdk.notice(`Success! ${JSON.stringify(result)}`);\n } else {\n sdk.alert('Closed!');\n }\n"
2157
+ "text": "\n const result = await ctx.openModal({\n id: 'regular',\n title: 'Custom title!',\n width: 'l',\n parameters: { foo: 'bar' },\n });\n\n if (result) {\n ctx.notice(`Success! ${JSON.stringify(result)}`);\n } else {\n ctx.alert('Closed!');\n }\n"
2158
2158
  }
2159
2159
  ]
2160
2160
  },
@@ -2199,7 +2199,7 @@
2199
2199
  "sources": [
2200
2200
  {
2201
2201
  "fileName": "types.ts",
2202
- "line": 766,
2202
+ "line": 795,
2203
2203
  "character": 34
2204
2204
  }
2205
2205
  ]
@@ -4414,7 +4414,7 @@
4414
4414
  "sources": [
4415
4415
  {
4416
4416
  "fileName": "types.ts",
4417
- "line": 832,
4417
+ "line": 863,
4418
4418
  "character": 12
4419
4419
  }
4420
4420
  ],
@@ -4436,7 +4436,7 @@
4436
4436
  "sources": [
4437
4437
  {
4438
4438
  "fileName": "types.ts",
4439
- "line": 834,
4439
+ "line": 865,
4440
4440
  "character": 2
4441
4441
  }
4442
4442
  ],
@@ -4483,7 +4483,7 @@
4483
4483
  "sources": [
4484
4484
  {
4485
4485
  "fileName": "types.ts",
4486
- "line": 832,
4486
+ "line": 863,
4487
4487
  "character": 28
4488
4488
  }
4489
4489
  ]
@@ -4715,7 +4715,7 @@
4715
4715
  "sources": [
4716
4716
  {
4717
4717
  "fileName": "types.ts",
4718
- "line": 603,
4718
+ "line": 610,
4719
4719
  "character": 12
4720
4720
  }
4721
4721
  ],
@@ -4737,7 +4737,7 @@
4737
4737
  "sources": [
4738
4738
  {
4739
4739
  "fileName": "types.ts",
4740
- "line": 632,
4740
+ "line": 645,
4741
4741
  "character": 2
4742
4742
  }
4743
4743
  ],
@@ -4752,7 +4752,7 @@
4752
4752
  "sources": [
4753
4753
  {
4754
4754
  "fileName": "types.ts",
4755
- "line": 632,
4755
+ "line": 645,
4756
4756
  "character": 14
4757
4757
  }
4758
4758
  ],
@@ -4768,7 +4768,7 @@
4768
4768
  "tags": [
4769
4769
  {
4770
4770
  "tag": "example",
4771
- "text": "\n const items = await ctx.selectItem('810907', { multiple: true });\n if (items) {\n ctx.notice(`Success! ${items.map((i) => i.id).join(', ')}`);\n } else {\n ctx.alert('Closed!');\n }\n"
4771
+ "text": "\n const itemTypeId = prompt('Please insert a model ID:');\n\n const items = await ctx.selectItem(itemTypeId, { multiple: true });\n\n if (items) {\n ctx.notice(`Success! ${items.map((i) => i.id).join(', ')}`);\n } else {\n ctx.alert('Closed!');\n }\n"
4772
4772
  }
4773
4773
  ]
4774
4774
  },
@@ -4808,7 +4808,7 @@
4808
4808
  "sources": [
4809
4809
  {
4810
4810
  "fileName": "types.ts",
4811
- "line": 633,
4811
+ "line": 646,
4812
4812
  "character": 36
4813
4813
  }
4814
4814
  ],
@@ -4866,7 +4866,7 @@
4866
4866
  "tags": [
4867
4867
  {
4868
4868
  "tag": "example",
4869
- "text": "\n const items = await ctx.selectItem('810907', { multiple: true });\n if (items) {\n ctx.notice(`Success! ${items.map((i) => i.id).join(', ')}`);\n } else {\n ctx.alert('Closed!');\n }\n"
4869
+ "text": "\n const itemTypeId = prompt('Please insert a model ID:');\n\n const items = await ctx.selectItem(itemTypeId, { multiple: true });\n\n if (items) {\n ctx.notice(`Success! ${items.map((i) => i.id).join(', ')}`);\n } else {\n ctx.alert('Closed!');\n }\n"
4870
4870
  }
4871
4871
  ]
4872
4872
  },
@@ -4908,7 +4908,7 @@
4908
4908
  "sources": [
4909
4909
  {
4910
4910
  "fileName": "types.ts",
4911
- "line": 634,
4911
+ "line": 647,
4912
4912
  "character": 37
4913
4913
  }
4914
4914
  ],
@@ -4965,7 +4965,7 @@
4965
4965
  "sources": [
4966
4966
  {
4967
4967
  "fileName": "types.ts",
4968
- "line": 617,
4968
+ "line": 627,
4969
4969
  "character": 2
4970
4970
  }
4971
4971
  ],
@@ -4981,7 +4981,7 @@
4981
4981
  "tags": [
4982
4982
  {
4983
4983
  "tag": "example",
4984
- "text": "\n const item = await sdk.createNewItem('810907');\n if (item) {\n sdk.notice(`Success! ${item.id}`);\n } else {\n sdk.alert('Closed!');\n }\n"
4984
+ "text": "\n const itemTypeId = prompt('Please insert a model ID:');\n\n const item = await ctx.createNewItem(itemTypeId);\n\n if (item) {\n ctx.notice(`Success! ${item.id}`);\n } else {\n ctx.alert('Closed!');\n }\n"
4985
4985
  }
4986
4986
  ]
4987
4987
  },
@@ -5030,7 +5030,7 @@
5030
5030
  "sources": [
5031
5031
  {
5032
5032
  "fileName": "types.ts",
5033
- "line": 650,
5033
+ "line": 665,
5034
5034
  "character": 2
5035
5035
  }
5036
5036
  ],
@@ -5046,7 +5046,7 @@
5046
5046
  "tags": [
5047
5047
  {
5048
5048
  "tag": "example",
5049
- "text": "\n const item = await sdk.editItem('50479504');\n\n if (item) {\n sdk.notice(`Success! ${item.id}`);\n } else {\n sdk.alert('Closed!');\n }\n"
5049
+ "text": "\n const itemId = prompt('Please insert a record ID:');\n\n const item = await ctx.editItem(itemId);\n\n if (item) {\n ctx.notice(`Success! ${item.id}`);\n } else {\n ctx.alert('Closed!');\n }\n"
5050
5050
  }
5051
5051
  ]
5052
5052
  },
@@ -5107,7 +5107,7 @@
5107
5107
  "sources": [
5108
5108
  {
5109
5109
  "fileName": "types.ts",
5110
- "line": 603,
5110
+ "line": 610,
5111
5111
  "character": 32
5112
5112
  }
5113
5113
  ]
@@ -5126,7 +5126,7 @@
5126
5126
  "sources": [
5127
5127
  {
5128
5128
  "fileName": "types.ts",
5129
- "line": 871,
5129
+ "line": 902,
5130
5130
  "character": 12
5131
5131
  }
5132
5132
  ],
@@ -5148,7 +5148,7 @@
5148
5148
  "sources": [
5149
5149
  {
5150
5150
  "fileName": "types.ts",
5151
- "line": 885,
5151
+ "line": 925,
5152
5152
  "character": 2
5153
5153
  }
5154
5154
  ],
@@ -5164,7 +5164,7 @@
5164
5164
  "tags": [
5165
5165
  {
5166
5166
  "tag": "example",
5167
- "text": "\n sdk.disableField(sdk.fieldPath, true);\n"
5167
+ "text": "\n const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n );\n ctx.disableField(fieldPath, true);\n"
5168
5168
  }
5169
5169
  ]
5170
5170
  },
@@ -5208,7 +5208,7 @@
5208
5208
  "sources": [
5209
5209
  {
5210
5210
  "fileName": "types.ts",
5211
- "line": 907,
5211
+ "line": 955,
5212
5212
  "character": 2
5213
5213
  }
5214
5214
  ],
@@ -5224,7 +5224,7 @@
5224
5224
  "tags": [
5225
5225
  {
5226
5226
  "tag": "example",
5227
- "text": "\n await sdk.saveCurrentItem();\n"
5227
+ "text": "\n await ctx.saveCurrentItem();\n"
5228
5228
  }
5229
5229
  ]
5230
5230
  },
@@ -5250,7 +5250,7 @@
5250
5250
  "sources": [
5251
5251
  {
5252
5252
  "fileName": "types.ts",
5253
- "line": 893,
5253
+ "line": 937,
5254
5254
  "character": 2
5255
5255
  }
5256
5256
  ],
@@ -5266,7 +5266,7 @@
5266
5266
  "tags": [
5267
5267
  {
5268
5268
  "tag": "example",
5269
- "text": "\n sdk.scrollToField(sdk.fieldPath);\n"
5269
+ "text": "\n const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n );\n ctx.scrollToField(fieldPath);\n"
5270
5270
  }
5271
5271
  ]
5272
5272
  },
@@ -5312,7 +5312,7 @@
5312
5312
  "sources": [
5313
5313
  {
5314
5314
  "fileName": "types.ts",
5315
- "line": 900,
5315
+ "line": 948,
5316
5316
  "character": 2
5317
5317
  }
5318
5318
  ],
@@ -5328,7 +5328,7 @@
5328
5328
  "tags": [
5329
5329
  {
5330
5330
  "tag": "example",
5331
- "text": "\n sdk.setFieldValue(sdk.fieldPath, 'new value');\n"
5331
+ "text": "\n const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n );\n ctx.setFieldValue(fieldPath, 'new value');\n"
5332
5332
  }
5333
5333
  ]
5334
5334
  },
@@ -5372,7 +5372,7 @@
5372
5372
  "sources": [
5373
5373
  {
5374
5374
  "fileName": "types.ts",
5375
- "line": 878,
5375
+ "line": 914,
5376
5376
  "character": 2
5377
5377
  }
5378
5378
  ],
@@ -5388,7 +5388,7 @@
5388
5388
  "tags": [
5389
5389
  {
5390
5390
  "tag": "example",
5391
- "text": "\n sdk.toggleField(sdk.fieldPath, true);\n"
5391
+ "text": "\n const fieldPath = prompt(\n 'Please insert the path of a field in the form',\n ctx.fieldPath,\n );\n\n ctx.toggleField(fieldPath, true);\n"
5392
5392
  }
5393
5393
  ]
5394
5394
  },
@@ -5440,7 +5440,7 @@
5440
5440
  "sources": [
5441
5441
  {
5442
5442
  "fileName": "types.ts",
5443
- "line": 871,
5443
+ "line": 902,
5444
5444
  "character": 40
5445
5445
  }
5446
5446
  ]
@@ -5459,7 +5459,7 @@
5459
5459
  "sources": [
5460
5460
  {
5461
5461
  "fileName": "types.ts",
5462
- "line": 847,
5462
+ "line": 878,
5463
5463
  "character": 12
5464
5464
  }
5465
5465
  ],
@@ -5484,7 +5484,7 @@
5484
5484
  "sources": [
5485
5485
  {
5486
5486
  "fileName": "types.ts",
5487
- "line": 855,
5487
+ "line": 886,
5488
5488
  "character": 2
5489
5489
  }
5490
5490
  ],
@@ -5515,7 +5515,7 @@
5515
5515
  "sources": [
5516
5516
  {
5517
5517
  "fileName": "types.ts",
5518
- "line": 861,
5518
+ "line": 892,
5519
5519
  "character": 2
5520
5520
  }
5521
5521
  ],
@@ -5536,7 +5536,7 @@
5536
5536
  "sources": [
5537
5537
  {
5538
5538
  "fileName": "types.ts",
5539
- "line": 859,
5539
+ "line": 890,
5540
5540
  "character": 2
5541
5541
  }
5542
5542
  ],
@@ -5557,7 +5557,7 @@
5557
5557
  "sources": [
5558
5558
  {
5559
5559
  "fileName": "types.ts",
5560
- "line": 851,
5560
+ "line": 882,
5561
5561
  "character": 2
5562
5562
  }
5563
5563
  ],
@@ -5588,7 +5588,7 @@
5588
5588
  "sources": [
5589
5589
  {
5590
5590
  "fileName": "types.ts",
5591
- "line": 857,
5591
+ "line": 888,
5592
5592
  "character": 2
5593
5593
  }
5594
5594
  ],
@@ -5626,7 +5626,7 @@
5626
5626
  "sources": [
5627
5627
  {
5628
5628
  "fileName": "types.ts",
5629
- "line": 853,
5629
+ "line": 884,
5630
5630
  "character": 2
5631
5631
  }
5632
5632
  ],
@@ -5648,7 +5648,7 @@
5648
5648
  "sources": [
5649
5649
  {
5650
5650
  "fileName": "types.ts",
5651
- "line": 849,
5651
+ "line": 880,
5652
5652
  "character": 2
5653
5653
  }
5654
5654
  ],
@@ -5676,7 +5676,7 @@
5676
5676
  "sources": [
5677
5677
  {
5678
5678
  "fileName": "types.ts",
5679
- "line": 847,
5679
+ "line": 878,
5680
5680
  "character": 43
5681
5681
  }
5682
5682
  ]
@@ -5692,7 +5692,7 @@
5692
5692
  "sources": [
5693
5693
  {
5694
5694
  "fileName": "types.ts",
5695
- "line": 910,
5695
+ "line": 958,
5696
5696
  "character": 12
5697
5697
  }
5698
5698
  ],
@@ -5726,7 +5726,7 @@
5726
5726
  "sources": [
5727
5727
  {
5728
5728
  "fileName": "types.ts",
5729
- "line": 864,
5729
+ "line": 895,
5730
5730
  "character": 12
5731
5731
  }
5732
5732
  ],
@@ -6030,7 +6030,7 @@
6030
6030
  "sources": [
6031
6031
  {
6032
6032
  "fileName": "types.ts",
6033
- "line": 555,
6033
+ "line": 556,
6034
6034
  "character": 12
6035
6035
  }
6036
6036
  ],
@@ -6052,7 +6052,7 @@
6052
6052
  "sources": [
6053
6053
  {
6054
6054
  "fileName": "types.ts",
6055
- "line": 581,
6055
+ "line": 586,
6056
6056
  "character": 2
6057
6057
  }
6058
6058
  ],
@@ -6068,7 +6068,7 @@
6068
6068
  "tags": [
6069
6069
  {
6070
6070
  "tag": "example",
6071
- "text": "\n const fields = await sdk.loadFieldsUsingPlugin();\n sdk.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n );\n"
6071
+ "text": "\n const fields = await ctx.loadFieldsUsingPlugin();\n\n ctx.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n );\n"
6072
6072
  }
6073
6073
  ]
6074
6074
  },
@@ -6098,7 +6098,7 @@
6098
6098
  "sources": [
6099
6099
  {
6100
6100
  "fileName": "types.ts",
6101
- "line": 568,
6101
+ "line": 572,
6102
6102
  "character": 2
6103
6103
  }
6104
6104
  ],
@@ -6114,7 +6114,7 @@
6114
6114
  "tags": [
6115
6115
  {
6116
6116
  "tag": "example",
6117
- "text": "\n const fields = await sdk.loadItemTypeFields('810907');\n sdk.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n );\n"
6117
+ "text": "\n const fieldId = prompt('Please insert a field ID:');\n\n const fields = await ctx.loadItemTypeFields(fieldId);\n\n ctx.notice(\n `Success! ${fields\n .map((field) => field.attributes.api_key)\n .join(', ')}`,\n );\n"
6118
6118
  }
6119
6119
  ]
6120
6120
  },
@@ -6157,7 +6157,7 @@
6157
6157
  "sources": [
6158
6158
  {
6159
6159
  "fileName": "types.ts",
6160
- "line": 599,
6160
+ "line": 606,
6161
6161
  "character": 2
6162
6162
  }
6163
6163
  ],
@@ -6173,7 +6173,7 @@
6173
6173
  "tags": [
6174
6174
  {
6175
6175
  "tag": "example",
6176
- "text": "\n const users = await sdk.loadSsoUsers();\n sdk.notice(`Success! ${users.map((user) => i.id).join(', ')}`);\n"
6176
+ "text": "\n const users = await ctx.loadSsoUsers();\n\n ctx.notice(`Success! ${users.map((user) => i.id).join(', ')}`);\n"
6177
6177
  }
6178
6178
  ]
6179
6179
  },
@@ -6203,7 +6203,7 @@
6203
6203
  "sources": [
6204
6204
  {
6205
6205
  "fileName": "types.ts",
6206
- "line": 590,
6206
+ "line": 596,
6207
6207
  "character": 2
6208
6208
  }
6209
6209
  ],
@@ -6219,7 +6219,7 @@
6219
6219
  "tags": [
6220
6220
  {
6221
6221
  "tag": "example",
6222
- "text": "\n const users = await sdk.loadUsers();\n sdk.notice(`Success! ${users.map((user) => i.id).join(', ')}`);\n"
6222
+ "text": "\n const users = await ctx.loadUsers();\n\n ctx.notice(`Success! ${users.map((user) => i.id).join(', ')}`);\n"
6223
6223
  }
6224
6224
  ]
6225
6225
  },
@@ -6256,7 +6256,7 @@
6256
6256
  "sources": [
6257
6257
  {
6258
6258
  "fileName": "types.ts",
6259
- "line": 555,
6259
+ "line": 556,
6260
6260
  "character": 30
6261
6261
  }
6262
6262
  ]
@@ -7051,7 +7051,7 @@
7051
7051
  "sources": [
7052
7052
  {
7053
7053
  "fileName": "types.ts",
7054
- "line": 821,
7054
+ "line": 852,
7055
7055
  "character": 12
7056
7056
  }
7057
7057
  ],
@@ -7073,7 +7073,7 @@
7073
7073
  "sources": [
7074
7074
  {
7075
7075
  "fileName": "types.ts",
7076
- "line": 828,
7076
+ "line": 859,
7077
7077
  "character": 2
7078
7078
  }
7079
7079
  ],
@@ -7089,7 +7089,7 @@
7089
7089
  "tags": [
7090
7090
  {
7091
7091
  "tag": "example",
7092
- "text": "\n sdk.navigateTo('/');\n"
7092
+ "text": "\n ctx.navigateTo('/');\n"
7093
7093
  }
7094
7094
  ]
7095
7095
  },
@@ -7126,7 +7126,7 @@
7126
7126
  "sources": [
7127
7127
  {
7128
7128
  "fileName": "types.ts",
7129
- "line": 821,
7129
+ "line": 852,
7130
7130
  "character": 30
7131
7131
  }
7132
7132
  ]
@@ -7142,7 +7142,7 @@
7142
7142
  "sources": [
7143
7143
  {
7144
7144
  "fileName": "types.ts",
7145
- "line": 1095,
7145
+ "line": 1151,
7146
7146
  "character": 12
7147
7147
  }
7148
7148
  ],
@@ -7164,7 +7164,7 @@
7164
7164
  "sources": [
7165
7165
  {
7166
7166
  "fileName": "types.ts",
7167
- "line": 1096,
7167
+ "line": 1152,
7168
7168
  "character": 2
7169
7169
  }
7170
7170
  ],
@@ -7202,7 +7202,7 @@
7202
7202
  "sources": [
7203
7203
  {
7204
7204
  "fileName": "types.ts",
7205
- "line": 1095,
7205
+ "line": 1151,
7206
7206
  "character": 38
7207
7207
  }
7208
7208
  ]
@@ -7218,7 +7218,7 @@
7218
7218
  "sources": [
7219
7219
  {
7220
7220
  "fileName": "types.ts",
7221
- "line": 1089,
7221
+ "line": 1145,
7222
7222
  "character": 12
7223
7223
  }
7224
7224
  ],
@@ -7240,7 +7240,7 @@
7240
7240
  "sources": [
7241
7241
  {
7242
7242
  "fileName": "types.ts",
7243
- "line": 1090,
7243
+ "line": 1146,
7244
7244
  "character": 2
7245
7245
  }
7246
7246
  ],
@@ -7262,7 +7262,7 @@
7262
7262
  "sources": [
7263
7263
  {
7264
7264
  "fileName": "types.ts",
7265
- "line": 1089,
7265
+ "line": 1145,
7266
7266
  "character": 41
7267
7267
  }
7268
7268
  ]
@@ -7297,7 +7297,7 @@
7297
7297
  "sources": [
7298
7298
  {
7299
7299
  "fileName": "types.ts",
7300
- "line": 1099,
7300
+ "line": 1155,
7301
7301
  "character": 12
7302
7302
  }
7303
7303
  ],
@@ -7326,7 +7326,7 @@
7326
7326
  "sources": [
7327
7327
  {
7328
7328
  "fileName": "types.ts",
7329
- "line": 1093,
7329
+ "line": 1149,
7330
7330
  "character": 12
7331
7331
  }
7332
7332
  ],
@@ -7355,7 +7355,7 @@
7355
7355
  "sources": [
7356
7356
  {
7357
7357
  "fileName": "types.ts",
7358
- "line": 1101,
7358
+ "line": 1157,
7359
7359
  "character": 12
7360
7360
  }
7361
7361
  ],
@@ -7633,7 +7633,7 @@
7633
7633
  "sources": [
7634
7634
  {
7635
7635
  "fileName": "types.ts",
7636
- "line": 1078,
7636
+ "line": 1134,
7637
7637
  "character": 12
7638
7638
  }
7639
7639
  ],
@@ -7655,7 +7655,7 @@
7655
7655
  "sources": [
7656
7656
  {
7657
7657
  "fileName": "types.ts",
7658
- "line": 1079,
7658
+ "line": 1135,
7659
7659
  "character": 2
7660
7660
  }
7661
7661
  ],
@@ -7693,7 +7693,7 @@
7693
7693
  "sources": [
7694
7694
  {
7695
7695
  "fileName": "types.ts",
7696
- "line": 1078,
7696
+ "line": 1134,
7697
7697
  "character": 50
7698
7698
  }
7699
7699
  ]
@@ -7709,7 +7709,7 @@
7709
7709
  "sources": [
7710
7710
  {
7711
7711
  "fileName": "types.ts",
7712
- "line": 1070,
7712
+ "line": 1126,
7713
7713
  "character": 12
7714
7714
  }
7715
7715
  ],
@@ -7731,7 +7731,7 @@
7731
7731
  "sources": [
7732
7732
  {
7733
7733
  "fileName": "types.ts",
7734
- "line": 1071,
7734
+ "line": 1127,
7735
7735
  "character": 2
7736
7736
  }
7737
7737
  ],
@@ -7753,7 +7753,7 @@
7753
7753
  "sources": [
7754
7754
  {
7755
7755
  "fileName": "types.ts",
7756
- "line": 1070,
7756
+ "line": 1126,
7757
7757
  "character": 53
7758
7758
  }
7759
7759
  ]
@@ -7798,7 +7798,7 @@
7798
7798
  "sources": [
7799
7799
  {
7800
7800
  "fileName": "types.ts",
7801
- "line": 1082,
7801
+ "line": 1138,
7802
7802
  "character": 12
7803
7803
  }
7804
7804
  ],
@@ -7832,7 +7832,7 @@
7832
7832
  "sources": [
7833
7833
  {
7834
7834
  "fileName": "types.ts",
7835
- "line": 1074,
7835
+ "line": 1130,
7836
7836
  "character": 12
7837
7837
  }
7838
7838
  ],
@@ -7861,7 +7861,7 @@
7861
7861
  "sources": [
7862
7862
  {
7863
7863
  "fileName": "types.ts",
7864
- "line": 1086,
7864
+ "line": 1142,
7865
7865
  "character": 12
7866
7866
  }
7867
7867
  ],
@@ -7890,7 +7890,7 @@
7890
7890
  "sources": [
7891
7891
  {
7892
7892
  "fileName": "types.ts",
7893
- "line": 967,
7893
+ "line": 1015,
7894
7894
  "character": 12
7895
7895
  }
7896
7896
  ],
@@ -7912,7 +7912,7 @@
7912
7912
  "sources": [
7913
7913
  {
7914
7914
  "fileName": "types.ts",
7915
- "line": 968,
7915
+ "line": 1016,
7916
7916
  "character": 2
7917
7917
  }
7918
7918
  ],
@@ -7950,7 +7950,7 @@
7950
7950
  "sources": [
7951
7951
  {
7952
7952
  "fileName": "types.ts",
7953
- "line": 967,
7953
+ "line": 1015,
7954
7954
  "character": 52
7955
7955
  }
7956
7956
  ]
@@ -7969,7 +7969,7 @@
7969
7969
  "sources": [
7970
7970
  {
7971
7971
  "fileName": "types.ts",
7972
- "line": 943,
7972
+ "line": 991,
7973
7973
  "character": 12
7974
7974
  }
7975
7975
  ],
@@ -7994,7 +7994,7 @@
7994
7994
  "sources": [
7995
7995
  {
7996
7996
  "fileName": "types.ts",
7997
- "line": 952,
7997
+ "line": 1000,
7998
7998
  "character": 2
7999
7999
  }
8000
8000
  ],
@@ -8015,7 +8015,7 @@
8015
8015
  "sources": [
8016
8016
  {
8017
8017
  "fileName": "types.ts",
8018
- "line": 956,
8018
+ "line": 1004,
8019
8019
  "character": 2
8020
8020
  }
8021
8021
  ],
@@ -8037,7 +8037,7 @@
8037
8037
  "sources": [
8038
8038
  {
8039
8039
  "fileName": "types.ts",
8040
- "line": 946,
8040
+ "line": 994,
8041
8041
  "character": 2
8042
8042
  }
8043
8043
  ],
@@ -8058,7 +8058,7 @@
8058
8058
  "sources": [
8059
8059
  {
8060
8060
  "fileName": "types.ts",
8061
- "line": 954,
8061
+ "line": 1002,
8062
8062
  "character": 2
8063
8063
  }
8064
8064
  ],
@@ -8076,7 +8076,7 @@
8076
8076
  "sources": [
8077
8077
  {
8078
8078
  "fileName": "types.ts",
8079
- "line": 944,
8079
+ "line": 992,
8080
8080
  "character": 2
8081
8081
  }
8082
8082
  ],
@@ -8097,7 +8097,7 @@
8097
8097
  "sources": [
8098
8098
  {
8099
8099
  "fileName": "types.ts",
8100
- "line": 948,
8100
+ "line": 996,
8101
8101
  "character": 2
8102
8102
  }
8103
8103
  ],
@@ -8128,7 +8128,7 @@
8128
8128
  "sources": [
8129
8129
  {
8130
8130
  "fileName": "types.ts",
8131
- "line": 961,
8131
+ "line": 1009,
8132
8132
  "character": 2
8133
8133
  }
8134
8134
  ],
@@ -8159,7 +8159,7 @@
8159
8159
  "sources": [
8160
8160
  {
8161
8161
  "fileName": "types.ts",
8162
- "line": 950,
8162
+ "line": 998,
8163
8163
  "character": 2
8164
8164
  }
8165
8165
  ],
@@ -8188,7 +8188,7 @@
8188
8188
  "sources": [
8189
8189
  {
8190
8190
  "fileName": "types.ts",
8191
- "line": 943,
8191
+ "line": 991,
8192
8192
  "character": 55
8193
8193
  }
8194
8194
  ]
@@ -8233,7 +8233,7 @@
8233
8233
  "sources": [
8234
8234
  {
8235
8235
  "fileName": "types.ts",
8236
- "line": 971,
8236
+ "line": 1019,
8237
8237
  "character": 12
8238
8238
  }
8239
8239
  ],
@@ -8262,7 +8262,7 @@
8262
8262
  "sources": [
8263
8263
  {
8264
8264
  "fileName": "types.ts",
8265
- "line": 964,
8265
+ "line": 1012,
8266
8266
  "character": 12
8267
8267
  }
8268
8268
  ],
@@ -8291,7 +8291,7 @@
8291
8291
  "sources": [
8292
8292
  {
8293
8293
  "fileName": "types.ts",
8294
- "line": 974,
8294
+ "line": 1022,
8295
8295
  "character": 12
8296
8296
  }
8297
8297
  ],
@@ -8352,7 +8352,7 @@
8352
8352
  "sources": [
8353
8353
  {
8354
8354
  "fileName": "types.ts",
8355
- "line": 1052,
8355
+ "line": 1108,
8356
8356
  "character": 12
8357
8357
  }
8358
8358
  ],
@@ -8374,7 +8374,7 @@
8374
8374
  "sources": [
8375
8375
  {
8376
8376
  "fileName": "types.ts",
8377
- "line": 1053,
8377
+ "line": 1109,
8378
8378
  "character": 2
8379
8379
  }
8380
8380
  ],
@@ -8408,7 +8408,7 @@
8408
8408
  "sources": [
8409
8409
  {
8410
8410
  "fileName": "types.ts",
8411
- "line": 1060,
8411
+ "line": 1116,
8412
8412
  "character": 2
8413
8413
  }
8414
8414
  ],
@@ -8478,7 +8478,7 @@
8478
8478
  "sources": [
8479
8479
  {
8480
8480
  "fileName": "types.ts",
8481
- "line": 1052,
8481
+ "line": 1108,
8482
8482
  "character": 70
8483
8483
  }
8484
8484
  ]
@@ -8497,7 +8497,7 @@
8497
8497
  "sources": [
8498
8498
  {
8499
8499
  "fileName": "types.ts",
8500
- "line": 1029,
8500
+ "line": 1085,
8501
8501
  "character": 12
8502
8502
  }
8503
8503
  ],
@@ -8522,7 +8522,7 @@
8522
8522
  "sources": [
8523
8523
  {
8524
8524
  "fileName": "types.ts",
8525
- "line": 1042,
8525
+ "line": 1098,
8526
8526
  "character": 2
8527
8527
  }
8528
8528
  ],
@@ -8553,7 +8553,7 @@
8553
8553
  "sources": [
8554
8554
  {
8555
8555
  "fileName": "types.ts",
8556
- "line": 1032,
8556
+ "line": 1088,
8557
8557
  "character": 2
8558
8558
  }
8559
8559
  ],
@@ -8571,7 +8571,7 @@
8571
8571
  "sources": [
8572
8572
  {
8573
8573
  "fileName": "types.ts",
8574
- "line": 1030,
8574
+ "line": 1086,
8575
8575
  "character": 2
8576
8576
  }
8577
8577
  ],
@@ -8592,7 +8592,7 @@
8592
8592
  "sources": [
8593
8593
  {
8594
8594
  "fileName": "types.ts",
8595
- "line": 1037,
8595
+ "line": 1093,
8596
8596
  "character": 2
8597
8597
  }
8598
8598
  ],
@@ -8627,7 +8627,7 @@
8627
8627
  "sources": [
8628
8628
  {
8629
8629
  "fileName": "types.ts",
8630
- "line": 1029,
8630
+ "line": 1085,
8631
8631
  "character": 73
8632
8632
  }
8633
8633
  ]
@@ -8672,7 +8672,7 @@
8672
8672
  "sources": [
8673
8673
  {
8674
8674
  "fileName": "types.ts",
8675
- "line": 1063,
8675
+ "line": 1119,
8676
8676
  "character": 12
8677
8677
  }
8678
8678
  ],
@@ -8706,7 +8706,7 @@
8706
8706
  "sources": [
8707
8707
  {
8708
8708
  "fileName": "types.ts",
8709
- "line": 1045,
8709
+ "line": 1101,
8710
8710
  "character": 12
8711
8711
  }
8712
8712
  ],
@@ -8735,7 +8735,7 @@
8735
8735
  "sources": [
8736
8736
  {
8737
8737
  "fileName": "types.ts",
8738
- "line": 1067,
8738
+ "line": 1123,
8739
8739
  "character": 12
8740
8740
  }
8741
8741
  ],
@@ -8764,7 +8764,7 @@
8764
8764
  "sources": [
8765
8765
  {
8766
8766
  "fileName": "types.ts",
8767
- "line": 837,
8767
+ "line": 868,
8768
8768
  "character": 12
8769
8769
  }
8770
8770
  ],
@@ -8811,7 +8811,7 @@
8811
8811
  "sources": [
8812
8812
  {
8813
8813
  "fileName": "types.ts",
8814
- "line": 990,
8814
+ "line": 1038,
8815
8815
  "character": 12
8816
8816
  }
8817
8817
  ],
@@ -8833,7 +8833,7 @@
8833
8833
  "sources": [
8834
8834
  {
8835
8835
  "fileName": "types.ts",
8836
- "line": 991,
8836
+ "line": 1039,
8837
8837
  "character": 2
8838
8838
  }
8839
8839
  ],
@@ -8867,7 +8867,7 @@
8867
8867
  "sources": [
8868
8868
  {
8869
8869
  "fileName": "types.ts",
8870
- "line": 996,
8870
+ "line": 1052,
8871
8871
  "character": 2
8872
8872
  }
8873
8873
  ],
@@ -8879,7 +8879,13 @@
8879
8879
  "kindString": "Call signature",
8880
8880
  "flags": {},
8881
8881
  "comment": {
8882
- "shortText": "A function to be called by the plugin to close the modal. The `openModal`\ncall will be resolved with the passed return value"
8882
+ "shortText": "A function to be called by the plugin to close the modal. The `openModal`\ncall will be resolved with the passed return value",
8883
+ "tags": [
8884
+ {
8885
+ "tag": "example",
8886
+ "text": "\n const returnValue = prompt(\n 'Please specify the value to return to the caller:',\n 'success',\n );\n\n ctx.resolve(returnValue);\n"
8887
+ }
8888
+ ]
8883
8889
  },
8884
8890
  "parameters": [
8885
8891
  {
@@ -8915,7 +8921,7 @@
8915
8921
  "sources": [
8916
8922
  {
8917
8923
  "fileName": "types.ts",
8918
- "line": 990,
8924
+ "line": 1038,
8919
8925
  "character": 43
8920
8926
  }
8921
8927
  ]
@@ -8934,7 +8940,7 @@
8934
8940
  "sources": [
8935
8941
  {
8936
8942
  "fileName": "types.ts",
8937
- "line": 978,
8943
+ "line": 1026,
8938
8944
  "character": 12
8939
8945
  }
8940
8946
  ],
@@ -8959,7 +8965,7 @@
8959
8965
  "sources": [
8960
8966
  {
8961
8967
  "fileName": "types.ts",
8962
- "line": 981,
8968
+ "line": 1029,
8963
8969
  "character": 2
8964
8970
  }
8965
8971
  ],
@@ -8977,7 +8983,7 @@
8977
8983
  "sources": [
8978
8984
  {
8979
8985
  "fileName": "types.ts",
8980
- "line": 979,
8986
+ "line": 1027,
8981
8987
  "character": 2
8982
8988
  }
8983
8989
  ],
@@ -8998,7 +9004,7 @@
8998
9004
  "sources": [
8999
9005
  {
9000
9006
  "fileName": "types.ts",
9001
- "line": 983,
9007
+ "line": 1031,
9002
9008
  "character": 2
9003
9009
  }
9004
9010
  ],
@@ -9032,7 +9038,7 @@
9032
9038
  "sources": [
9033
9039
  {
9034
9040
  "fileName": "types.ts",
9035
- "line": 978,
9041
+ "line": 1026,
9036
9042
  "character": 46
9037
9043
  }
9038
9044
  ]
@@ -9077,7 +9083,7 @@
9077
9083
  "sources": [
9078
9084
  {
9079
9085
  "fileName": "types.ts",
9080
- "line": 999,
9086
+ "line": 1055,
9081
9087
  "character": 12
9082
9088
  }
9083
9089
  ],
@@ -9111,7 +9117,7 @@
9111
9117
  "sources": [
9112
9118
  {
9113
9119
  "fileName": "types.ts",
9114
- "line": 986,
9120
+ "line": 1034,
9115
9121
  "character": 12
9116
9122
  }
9117
9123
  ],
@@ -9140,7 +9146,7 @@
9140
9146
  "sources": [
9141
9147
  {
9142
9148
  "fileName": "types.ts",
9143
- "line": 1003,
9149
+ "line": 1059,
9144
9150
  "character": 12
9145
9151
  }
9146
9152
  ],
@@ -9169,7 +9175,7 @@
9169
9175
  "sources": [
9170
9176
  {
9171
9177
  "fileName": "types.ts",
9172
- "line": 1016,
9178
+ "line": 1072,
9173
9179
  "character": 12
9174
9180
  }
9175
9181
  ],
@@ -9191,7 +9197,7 @@
9191
9197
  "sources": [
9192
9198
  {
9193
9199
  "fileName": "types.ts",
9194
- "line": 1017,
9200
+ "line": 1073,
9195
9201
  "character": 2
9196
9202
  }
9197
9203
  ],
@@ -9229,7 +9235,7 @@
9229
9235
  "sources": [
9230
9236
  {
9231
9237
  "fileName": "types.ts",
9232
- "line": 1016,
9238
+ "line": 1072,
9233
9239
  "character": 42
9234
9240
  }
9235
9241
  ]
@@ -9248,7 +9254,7 @@
9248
9254
  "sources": [
9249
9255
  {
9250
9256
  "fileName": "types.ts",
9251
- "line": 1007,
9257
+ "line": 1063,
9252
9258
  "character": 12
9253
9259
  }
9254
9260
  ],
@@ -9270,7 +9276,7 @@
9270
9276
  "sources": [
9271
9277
  {
9272
9278
  "fileName": "types.ts",
9273
- "line": 1008,
9279
+ "line": 1064,
9274
9280
  "character": 2
9275
9281
  }
9276
9282
  ],
@@ -9291,7 +9297,7 @@
9291
9297
  "sources": [
9292
9298
  {
9293
9299
  "fileName": "types.ts",
9294
- "line": 1010,
9300
+ "line": 1066,
9295
9301
  "character": 2
9296
9302
  }
9297
9303
  ],
@@ -9314,7 +9320,7 @@
9314
9320
  "sources": [
9315
9321
  {
9316
9322
  "fileName": "types.ts",
9317
- "line": 1007,
9323
+ "line": 1063,
9318
9324
  "character": 45
9319
9325
  }
9320
9326
  ]
@@ -9349,7 +9355,7 @@
9349
9355
  "sources": [
9350
9356
  {
9351
9357
  "fileName": "types.ts",
9352
- "line": 1020,
9358
+ "line": 1076,
9353
9359
  "character": 12
9354
9360
  }
9355
9361
  ],
@@ -9378,7 +9384,7 @@
9378
9384
  "sources": [
9379
9385
  {
9380
9386
  "fileName": "types.ts",
9381
- "line": 1013,
9387
+ "line": 1069,
9382
9388
  "character": 12
9383
9389
  }
9384
9390
  ],
@@ -9407,7 +9413,7 @@
9407
9413
  "sources": [
9408
9414
  {
9409
9415
  "fileName": "types.ts",
9410
- "line": 1022,
9416
+ "line": 1078,
9411
9417
  "character": 12
9412
9418
  }
9413
9419
  ],
@@ -9465,7 +9471,7 @@
9465
9471
  "sources": [
9466
9472
  {
9467
9473
  "fileName": "types.ts",
9468
- "line": 936,
9474
+ "line": 984,
9469
9475
  "character": 12
9470
9476
  }
9471
9477
  ],
@@ -9494,7 +9500,7 @@
9494
9500
  "sources": [
9495
9501
  {
9496
9502
  "fileName": "types.ts",
9497
- "line": 929,
9503
+ "line": 977,
9498
9504
  "character": 12
9499
9505
  }
9500
9506
  ],
@@ -9516,7 +9522,7 @@
9516
9522
  "sources": [
9517
9523
  {
9518
9524
  "fileName": "types.ts",
9519
- "line": 930,
9525
+ "line": 978,
9520
9526
  "character": 2
9521
9527
  }
9522
9528
  ],
@@ -9554,7 +9560,7 @@
9554
9560
  "sources": [
9555
9561
  {
9556
9562
  "fileName": "types.ts",
9557
- "line": 929,
9563
+ "line": 977,
9558
9564
  "character": 50
9559
9565
  }
9560
9566
  ]
@@ -9573,7 +9579,7 @@
9573
9579
  "sources": [
9574
9580
  {
9575
9581
  "fileName": "types.ts",
9576
- "line": 915,
9582
+ "line": 963,
9577
9583
  "character": 12
9578
9584
  }
9579
9585
  ],
@@ -9595,7 +9601,7 @@
9595
9601
  "sources": [
9596
9602
  {
9597
9603
  "fileName": "types.ts",
9598
- "line": 916,
9604
+ "line": 964,
9599
9605
  "character": 2
9600
9606
  }
9601
9607
  ],
@@ -9616,7 +9622,7 @@
9616
9622
  "sources": [
9617
9623
  {
9618
9624
  "fileName": "types.ts",
9619
- "line": 923,
9625
+ "line": 971,
9620
9626
  "character": 2
9621
9627
  }
9622
9628
  ],
@@ -9647,7 +9653,7 @@
9647
9653
  "sources": [
9648
9654
  {
9649
9655
  "fileName": "types.ts",
9650
- "line": 918,
9656
+ "line": 966,
9651
9657
  "character": 2
9652
9658
  }
9653
9659
  ],
@@ -9671,7 +9677,7 @@
9671
9677
  "sources": [
9672
9678
  {
9673
9679
  "fileName": "types.ts",
9674
- "line": 915,
9680
+ "line": 963,
9675
9681
  "character": 53
9676
9682
  }
9677
9683
  ]
@@ -9687,7 +9693,7 @@
9687
9693
  "sources": [
9688
9694
  {
9689
9695
  "fileName": "types.ts",
9690
- "line": 933,
9696
+ "line": 981,
9691
9697
  "character": 12
9692
9698
  }
9693
9699
  ],
@@ -9716,7 +9722,7 @@
9716
9722
  "sources": [
9717
9723
  {
9718
9724
  "fileName": "types.ts",
9719
- "line": 926,
9725
+ "line": 974,
9720
9726
  "character": 12
9721
9727
  }
9722
9728
  ],
@@ -10642,7 +10648,7 @@
10642
10648
  "sources": [
10643
10649
  {
10644
10650
  "fileName": "types.ts",
10645
- "line": 654,
10651
+ "line": 669,
10646
10652
  "character": 12
10647
10653
  }
10648
10654
  ],
@@ -10664,7 +10670,7 @@
10664
10670
  "sources": [
10665
10671
  {
10666
10672
  "fileName": "types.ts",
10667
- "line": 661,
10673
+ "line": 681,
10668
10674
  "character": 2
10669
10675
  }
10670
10676
  ],
@@ -10680,7 +10686,7 @@
10680
10686
  "tags": [
10681
10687
  {
10682
10688
  "tag": "example",
10683
- "text": "\n sdk.alert('Alert!');\n"
10689
+ "text": "\n const message = prompt(\n 'Please insert a message:',\n 'This is an alert message!',\n );\n\n ctx.alert(message);\n"
10684
10690
  }
10685
10691
  ]
10686
10692
  },
@@ -10713,7 +10719,7 @@
10713
10719
  "sources": [
10714
10720
  {
10715
10721
  "fileName": "types.ts",
10716
- "line": 688,
10722
+ "line": 713,
10717
10723
  "character": 2
10718
10724
  }
10719
10725
  ],
@@ -10729,7 +10735,7 @@
10729
10735
  "tags": [
10730
10736
  {
10731
10737
  "tag": "example",
10732
- "text": "\n const result = await sdk.customToast({\n type: 'warning',\n message: 'Just a sample warning notification!',\n dismissOnPageChange: true,\n dismissAfterTimeout: 22000,\n cta: {\n label: 'Execute call-to-action',\n value: 'cta',\n },\n });\n\n if (result === 'cta') {\n sdk.notice(`Clicked CTA!`);\n }\n"
10738
+ "text": "\n const result = await ctx.customToast({\n type: 'warning',\n message: 'Just a sample warning notification!',\n dismissOnPageChange: true,\n dismissAfterTimeout: 5000,\n cta: {\n label: 'Execute call-to-action',\n value: 'cta',\n },\n });\n\n if (result === 'cta') {\n ctx.notice(`Clicked CTA!`);\n }\n"
10733
10739
  }
10734
10740
  ]
10735
10741
  },
@@ -10799,7 +10805,7 @@
10799
10805
  "sources": [
10800
10806
  {
10801
10807
  "fileName": "types.ts",
10802
- "line": 668,
10808
+ "line": 693,
10803
10809
  "character": 2
10804
10810
  }
10805
10811
  ],
@@ -10815,7 +10821,7 @@
10815
10821
  "tags": [
10816
10822
  {
10817
10823
  "tag": "example",
10818
- "text": "\n sdk.notice('Notice!');\n"
10824
+ "text": "\n const message = prompt(\n 'Please insert a message:',\n 'This is a notice message!',\n );\n\n ctx.notice(message);\n"
10819
10825
  }
10820
10826
  ]
10821
10827
  },
@@ -10854,7 +10860,7 @@
10854
10860
  "sources": [
10855
10861
  {
10856
10862
  "fileName": "types.ts",
10857
- "line": 654,
10863
+ "line": 669,
10858
10864
  "character": 27
10859
10865
  }
10860
10866
  ]
@@ -10895,7 +10901,7 @@
10895
10901
  "sources": [
10896
10902
  {
10897
10903
  "fileName": "types.ts",
10898
- "line": 545,
10904
+ "line": 546,
10899
10905
  "character": 2
10900
10906
  }
10901
10907
  ],
@@ -10912,7 +10918,7 @@
10912
10918
  "tags": [
10913
10919
  {
10914
10920
  "tag": "example",
10915
- "text": "\n const fieldId = 234;\n ctx.updateFieldAppearance(234, [\n {\n operation: 'updateEditor',\n newFieldExtensionParameters: { foo: 'bar' },\n },\n {\n operation: 'updateAddon',\n index: 2,\n newFieldExtensionParameters: { bar: 'qux' },\n },\n ]);\n"
10921
+ "text": "\n const fieldId = prompt('Please insert a field ID:');\n\n ctx.updateFieldAppearance(fieldId, [\n {\n operation: 'updateEditor',\n newFieldExtensionParameters: { foo: 'bar' },\n },\n {\n operation: 'updateAddon',\n index: 2,\n newFieldExtensionParameters: { bar: 'qux' },\n },\n ]);\n"
10916
10922
  }
10917
10923
  ]
10918
10924
  },
@@ -11056,7 +11062,7 @@
11056
11062
  "sources": [
11057
11063
  {
11058
11064
  "fileName": "types.ts",
11059
- "line": 697,
11065
+ "line": 722,
11060
11066
  "character": 12
11061
11067
  }
11062
11068
  ],
@@ -11078,7 +11084,7 @@
11078
11084
  "sources": [
11079
11085
  {
11080
11086
  "fileName": "types.ts",
11081
- "line": 712,
11087
+ "line": 737,
11082
11088
  "character": 2
11083
11089
  }
11084
11090
  ],
@@ -11093,7 +11099,7 @@
11093
11099
  "sources": [
11094
11100
  {
11095
11101
  "fileName": "types.ts",
11096
- "line": 712,
11102
+ "line": 737,
11097
11103
  "character": 16
11098
11104
  }
11099
11105
  ],
@@ -11109,7 +11115,7 @@
11109
11115
  "tags": [
11110
11116
  {
11111
11117
  "tag": "example",
11112
- "text": "\n const item = await sdk.selectUpload({ multiple: false });\n\n if (item) {\n sdk.notice(`Success! ${item.id}`);\n } else {\n sdk.alert('Closed!');\n }\n"
11118
+ "text": "\n const item = await ctx.selectUpload({ multiple: false });\n\n if (item) {\n ctx.notice(`Success! ${item.id}`);\n } else {\n ctx.alert('Closed!');\n }\n"
11113
11119
  }
11114
11120
  ]
11115
11121
  },
@@ -11138,7 +11144,7 @@
11138
11144
  "sources": [
11139
11145
  {
11140
11146
  "fileName": "types.ts",
11141
- "line": 713,
11147
+ "line": 738,
11142
11148
  "character": 16
11143
11149
  }
11144
11150
  ],
@@ -11196,7 +11202,7 @@
11196
11202
  "tags": [
11197
11203
  {
11198
11204
  "tag": "example",
11199
- "text": "\n const item = await sdk.selectUpload({ multiple: false });\n\n if (item) {\n sdk.notice(`Success! ${item.id}`);\n } else {\n sdk.alert('Closed!');\n }\n"
11205
+ "text": "\n const item = await ctx.selectUpload({ multiple: false });\n\n if (item) {\n ctx.notice(`Success! ${item.id}`);\n } else {\n ctx.alert('Closed!');\n }\n"
11200
11206
  }
11201
11207
  ]
11202
11208
  },
@@ -11227,7 +11233,7 @@
11227
11233
  "sources": [
11228
11234
  {
11229
11235
  "fileName": "types.ts",
11230
- "line": 714,
11236
+ "line": 739,
11231
11237
  "character": 17
11232
11238
  }
11233
11239
  ],
@@ -11284,7 +11290,7 @@
11284
11290
  "sources": [
11285
11291
  {
11286
11292
  "fileName": "types.ts",
11287
- "line": 734,
11293
+ "line": 761,
11288
11294
  "character": 2
11289
11295
  }
11290
11296
  ],
@@ -11301,7 +11307,7 @@
11301
11307
  "tags": [
11302
11308
  {
11303
11309
  "tag": "example",
11304
- "text": "\n const item = await sdk.editUpload('21717537');\n\n if (item) {\n sdk.notice(`Success! ${item.id}`);\n } else {\n sdk.alert('Closed!');\n }\n"
11310
+ "text": "\n const uploadId = prompt('Please insert an asset ID:');\n\n const item = await ctx.editUpload(uploadId);\n\n if (item) {\n ctx.notice(`Success! ${item.id}`);\n } else {\n ctx.alert('Closed!');\n }\n"
11305
11311
  }
11306
11312
  ]
11307
11313
  },
@@ -11356,7 +11362,7 @@
11356
11362
  "sources": [
11357
11363
  {
11358
11364
  "fileName": "types.ts",
11359
- "line": 736,
11365
+ "line": 763,
11360
11366
  "character": 27
11361
11367
  }
11362
11368
  ],
@@ -11396,7 +11402,7 @@
11396
11402
  "sources": [
11397
11403
  {
11398
11404
  "fileName": "types.ts",
11399
- "line": 757,
11405
+ "line": 786,
11400
11406
  "character": 2
11401
11407
  }
11402
11408
  ],
@@ -11412,7 +11418,7 @@
11412
11418
  "tags": [
11413
11419
  {
11414
11420
  "tag": "example",
11415
- "text": "\n const result = await sdk.editUploadMetadata({\n upload_id: '21717537',\n alt: null,\n title: null,\n custom_data: {},\n focal_point: null,\n });\n\n if (result) {\n sdk.notice(`Success! ${JSON.stringify(result)}`);\n } else {\n sdk.alert('Closed!');\n }\n"
11421
+ "text": "\n const uploadId = prompt('Please insert an asset ID:');\n\n const result = await ctx.editUploadMetadata({\n upload_id: uploadId,\n alt: null,\n title: null,\n custom_data: {},\n focal_point: null,\n });\n\n if (result) {\n ctx.notice(`Success! ${JSON.stringify(result)}`);\n } else {\n ctx.alert('Closed!');\n }\n"
11416
11422
  }
11417
11423
  ]
11418
11424
  },
@@ -11487,7 +11493,7 @@
11487
11493
  "sources": [
11488
11494
  {
11489
11495
  "fileName": "types.ts",
11490
- "line": 697,
11496
+ "line": 722,
11491
11497
  "character": 34
11492
11498
  }
11493
11499
  ]