@tappify/extension-sdk 2.0.0 → 2.1.0-beta.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.
Files changed (148) hide show
  1. package/README.md +208 -0
  2. package/dist/chunk-2CY5HVY7.mjs +59 -0
  3. package/dist/chunk-2CY5HVY7.mjs.map +1 -0
  4. package/dist/{chunk-2DBSVKAU.cjs → chunk-6HETNZJY.cjs} +1 -1
  5. package/dist/chunk-6HETNZJY.cjs.map +1 -0
  6. package/dist/{chunk-PYJMJF44.cjs → chunk-7YKH4LZN.cjs} +9 -2
  7. package/dist/chunk-7YKH4LZN.cjs.map +1 -0
  8. package/dist/{chunk-RMUWRESK.cjs → chunk-A74HCO6T.cjs} +31 -18
  9. package/dist/chunk-A74HCO6T.cjs.map +1 -0
  10. package/dist/chunk-BPCGXXMD.cjs +781 -0
  11. package/dist/chunk-BPCGXXMD.cjs.map +1 -0
  12. package/dist/chunk-EB5XWQAU.cjs +132 -0
  13. package/dist/chunk-EB5XWQAU.cjs.map +1 -0
  14. package/dist/{chunk-5AAPD5WV.cjs → chunk-GAUZYBXE.cjs} +11 -11
  15. package/dist/chunk-GAUZYBXE.cjs.map +1 -0
  16. package/dist/chunk-J5LGTIGS.mjs +10 -0
  17. package/dist/chunk-J5LGTIGS.mjs.map +1 -0
  18. package/dist/{chunk-ZT35X7KL.mjs → chunk-KZ5NGFUP.mjs} +22 -9
  19. package/dist/chunk-KZ5NGFUP.mjs.map +1 -0
  20. package/dist/chunk-NN263PGQ.cjs +70 -0
  21. package/dist/chunk-NN263PGQ.cjs.map +1 -0
  22. package/dist/{chunk-3YWVYA42.cjs → chunk-O357OJXL.cjs} +14 -18
  23. package/dist/chunk-O357OJXL.cjs.map +1 -0
  24. package/dist/chunk-ONJMPO3P.cjs +59 -0
  25. package/dist/chunk-ONJMPO3P.cjs.map +1 -0
  26. package/dist/{chunk-OPPYEA7F.cjs → chunk-PRCZMOLD.cjs} +3 -3
  27. package/dist/chunk-PRCZMOLD.cjs.map +1 -0
  28. package/dist/chunk-Q7SFCCGT.cjs +10 -0
  29. package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
  30. package/dist/{chunk-QHM7XNRK.mjs → chunk-QA5AL3VZ.mjs} +2 -2
  31. package/dist/{chunk-QHM7XNRK.mjs.map → chunk-QA5AL3VZ.mjs.map} +1 -1
  32. package/dist/chunk-QJMZRV7A.mjs +132 -0
  33. package/dist/chunk-QJMZRV7A.mjs.map +1 -0
  34. package/dist/{chunk-CSTYBKZC.mjs → chunk-QXD7WVKK.mjs} +1 -1
  35. package/dist/chunk-QXD7WVKK.mjs.map +1 -0
  36. package/dist/{chunk-4C5Z3CIK.mjs → chunk-RBIQT75L.mjs} +2 -2
  37. package/dist/chunk-RBIQT75L.mjs.map +1 -0
  38. package/dist/{chunk-MNDVYPEP.mjs → chunk-SGCYEEXD.mjs} +9 -2
  39. package/dist/chunk-SGCYEEXD.mjs.map +1 -0
  40. package/dist/{chunk-BDCX6LRQ.mjs → chunk-SGEYDV3K.mjs} +3 -3
  41. package/dist/chunk-SGEYDV3K.mjs.map +1 -0
  42. package/dist/{chunk-IGK2AP6J.mjs → chunk-SLGOHIBL.mjs} +13 -17
  43. package/dist/chunk-SLGOHIBL.mjs.map +1 -0
  44. package/dist/chunk-SWG7CNTZ.mjs +781 -0
  45. package/dist/chunk-SWG7CNTZ.mjs.map +1 -0
  46. package/dist/{chunk-7KIKOH5H.cjs → chunk-VV7ELNRW.cjs} +3 -3
  47. package/dist/chunk-VV7ELNRW.cjs.map +1 -0
  48. package/dist/chunk-Z43DPNZ6.mjs +70 -0
  49. package/dist/chunk-Z43DPNZ6.mjs.map +1 -0
  50. package/dist/client-BO3kavn0.d.ts +25 -0
  51. package/dist/client-DE-vMgdO.d.cts +25 -0
  52. package/dist/codegen.cjs.map +1 -1
  53. package/dist/codegen.d.cts +43 -7
  54. package/dist/codegen.d.ts +43 -7
  55. package/dist/codegen.mjs.map +1 -1
  56. package/dist/{constants-DJ_KgZpN.d.cts → constants-Bh759FUI.d.cts} +44 -8
  57. package/dist/{constants-DJ_KgZpN.d.ts → constants-Bh759FUI.d.ts} +44 -8
  58. package/dist/{context-Dt6xh_5t.d.cts → context-DI0EJCRD.d.cts} +5 -4
  59. package/dist/{context-Ml7k_V14.d.ts → context-mr8R5CNt.d.ts} +5 -4
  60. package/dist/{errors-COsBh7kd.d.cts → errors-Cqh0wrqt.d.cts} +3 -2
  61. package/dist/{errors-COsBh7kd.d.ts → errors-Cqh0wrqt.d.ts} +3 -2
  62. package/dist/host.cjs +5 -4
  63. package/dist/host.cjs.map +1 -1
  64. package/dist/host.d.cts +5 -5
  65. package/dist/host.d.ts +5 -5
  66. package/dist/host.mjs +4 -3
  67. package/dist/host.mjs.map +1 -1
  68. package/dist/index.cjs +9 -656
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.d.cts +69 -627
  71. package/dist/index.d.ts +69 -627
  72. package/dist/index.mjs +5 -652
  73. package/dist/index.mjs.map +1 -1
  74. package/dist/manifest.cjs +142 -86
  75. package/dist/manifest.cjs.map +1 -1
  76. package/dist/manifest.d.cts +97 -12
  77. package/dist/manifest.d.ts +97 -12
  78. package/dist/manifest.mjs +129 -73
  79. package/dist/manifest.mjs.map +1 -1
  80. package/dist/server.cjs +15 -66
  81. package/dist/server.cjs.map +1 -1
  82. package/dist/server.d.cts +6 -6
  83. package/dist/server.d.ts +6 -6
  84. package/dist/server.mjs +10 -61
  85. package/dist/server.mjs.map +1 -1
  86. package/dist/testing/index.cjs +73 -750
  87. package/dist/testing/index.cjs.map +1 -1
  88. package/dist/testing/index.d.cts +30 -11
  89. package/dist/testing/index.d.ts +30 -11
  90. package/dist/testing/index.mjs +89 -766
  91. package/dist/testing/index.mjs.map +1 -1
  92. package/dist/testing/jest.cjs +6 -5
  93. package/dist/testing/jest.cjs.map +1 -1
  94. package/dist/testing/jest.mjs +3 -2
  95. package/dist/testing/jest.mjs.map +1 -1
  96. package/dist/testing/vitest.cjs +6 -5
  97. package/dist/testing/vitest.cjs.map +1 -1
  98. package/dist/testing/vitest.d.cts +10 -0
  99. package/dist/testing/vitest.d.ts +10 -0
  100. package/dist/testing/vitest.mjs +3 -2
  101. package/dist/testing/vitest.mjs.map +1 -1
  102. package/dist/{types-DDAGLpov.d.ts → types-BdDaLnqs.d.cts} +4 -3
  103. package/dist/{types-DrpQSv_2.d.cts → types-uGHrRaOj.d.ts} +4 -3
  104. package/dist/ui/styles.css +740 -0
  105. package/dist/ui.cjs +1018 -0
  106. package/dist/ui.cjs.map +1 -0
  107. package/dist/ui.d.cts +231 -0
  108. package/dist/ui.d.ts +231 -0
  109. package/dist/ui.mjs +1018 -0
  110. package/dist/ui.mjs.map +1 -0
  111. package/dist/vite-preview-bootstrap.cjs +66 -0
  112. package/dist/vite-preview-bootstrap.cjs.map +1 -0
  113. package/dist/vite-preview-bootstrap.d.cts +15 -0
  114. package/dist/vite-preview-bootstrap.d.ts +15 -0
  115. package/dist/vite-preview-bootstrap.mjs +66 -0
  116. package/dist/vite-preview-bootstrap.mjs.map +1 -0
  117. package/dist/vite-preview.cjs +876 -0
  118. package/dist/vite-preview.cjs.map +1 -0
  119. package/dist/vite-preview.d.cts +9 -0
  120. package/dist/vite-preview.d.ts +9 -0
  121. package/dist/vite-preview.mjs +876 -0
  122. package/dist/vite-preview.mjs.map +1 -0
  123. package/dist/vite.cjs +320 -60
  124. package/dist/vite.cjs.map +1 -1
  125. package/dist/vite.d.cts +54 -8
  126. package/dist/vite.d.ts +54 -8
  127. package/dist/vite.mjs +312 -54
  128. package/dist/vite.mjs.map +1 -1
  129. package/dist/work-events-BlOVpK0k.d.ts +547 -0
  130. package/dist/work-events-D97EoqvS.d.cts +547 -0
  131. package/package.json +19 -2
  132. package/schema/extension-v2.json +440 -121
  133. package/dist/chunk-2DBSVKAU.cjs.map +0 -1
  134. package/dist/chunk-3YWVYA42.cjs.map +0 -1
  135. package/dist/chunk-4C5Z3CIK.mjs.map +0 -1
  136. package/dist/chunk-5AAPD5WV.cjs.map +0 -1
  137. package/dist/chunk-7KIKOH5H.cjs.map +0 -1
  138. package/dist/chunk-BDCX6LRQ.mjs.map +0 -1
  139. package/dist/chunk-CSTYBKZC.mjs.map +0 -1
  140. package/dist/chunk-IGK2AP6J.mjs.map +0 -1
  141. package/dist/chunk-MNDVYPEP.mjs.map +0 -1
  142. package/dist/chunk-OPPYEA7F.cjs.map +0 -1
  143. package/dist/chunk-PYJMJF44.cjs.map +0 -1
  144. package/dist/chunk-RMUWRESK.cjs.map +0 -1
  145. package/dist/chunk-ZT35X7KL.mjs.map +0 -1
  146. package/dist/handler-CZIlZ5vu.d.ts +0 -227
  147. package/dist/handler-kU9Jf36K.d.cts +0 -227
  148. package/dist/styles.css +0 -367
package/dist/vite.d.cts CHANGED
@@ -30,6 +30,12 @@ declare const SCOPES: readonly [{
30
30
  readonly description: "Review text, ratings and replies";
31
31
  readonly requiresSecurityReview: false;
32
32
  readonly requiresJustification: false;
33
+ }, {
34
+ readonly key: "review.threads:read";
35
+ readonly label: "Read Review threads";
36
+ readonly description: "Review threads, comments, screenshot descriptors, build context and safe device context";
37
+ readonly requiresSecurityReview: false;
38
+ readonly requiresJustification: false;
33
39
  }, {
34
40
  readonly key: "crashes:read";
35
41
  readonly label: "Read crash data";
@@ -93,7 +99,7 @@ declare const SCOPES: readonly [{
93
99
  }, {
94
100
  readonly key: "work:sync";
95
101
  readonly label: "Sync work items";
96
- readonly description: "Two-way comments and status on created work items";
102
+ readonly description: "Sync comments and status on created work items";
97
103
  readonly requiresSecurityReview: false;
98
104
  readonly requiresJustification: true;
99
105
  }, {
@@ -257,6 +263,7 @@ interface CredentialField {
257
263
  options?: string[];
258
264
  help?: string;
259
265
  }
266
+ type OAuthTokenRequestEncoding = 'form' | 'json';
260
267
  interface ConnectorAuth {
261
268
  method: 'none' | 'api_key' | 'oauth';
262
269
  fields?: CredentialField[];
@@ -264,6 +271,8 @@ interface ConnectorAuth {
264
271
  authorizationUrl: string;
265
272
  tokenUrl: string;
266
273
  scopes: string[];
274
+ /** The token request body encoding. When omitted, uses form encoding. */
275
+ tokenRequestEncoding?: OAuthTokenRequestEncoding;
267
276
  };
268
277
  }
269
278
  interface DimensionDeclaration {
@@ -345,26 +354,53 @@ interface AiContribution {
345
354
  prompts?: PromptDeclaration[];
346
355
  context?: ContextDeclaration[];
347
356
  }
357
+ type WorkDirection = 'none' | 'to_provider' | 'from_provider' | 'two-way';
358
+ type WorkAuth = {
359
+ method: 'oauth';
360
+ provider: string;
361
+ scopes: string[];
362
+ } | {
363
+ method: 'api_key';
364
+ fields: CredentialField[];
365
+ };
348
366
  interface WorkContribution {
349
367
  kind: 'tracker' | 'docs' | 'chat';
350
- container: {
368
+ creates: ('issue' | 'page' | 'message')[];
369
+ identity: 'install' | 'user';
370
+ comments: 'two-way' | 'none' | {
371
+ direction: WorkDirection;
372
+ supportsEdits: false;
373
+ supportsDeletes: false;
374
+ };
375
+ status?: {
376
+ direction: WorkDirection;
377
+ webhook?: string;
378
+ map?: Record<'open' | 'in_progress' | 'done', string[]>;
379
+ };
380
+ attachments: ('image' | 'link')[];
381
+ auth: WorkAuth;
382
+ /** @deprecated resolved dynamically by describe_container */
383
+ container?: {
351
384
  label: string;
352
385
  list: string;
353
386
  };
354
- creates: ('issue' | 'page' | 'message')[];
355
- fields: {
387
+ /** @deprecated resolved dynamically by describe_container */
388
+ fields?: {
356
389
  priority?: string[];
357
390
  labels?: boolean;
358
391
  assignee?: boolean;
359
392
  required: string[];
360
393
  };
361
- attachments: ('image' | 'link')[];
394
+ }
395
+ /** @deprecated Migrate to WorkContribution during the SDK v2 compatibility window. */
396
+ interface LegacyWorkContribution extends Omit<WorkContribution, 'auth' | 'container' | 'fields' | 'comments' | 'status'> {
397
+ container: NonNullable<WorkContribution['container']>;
398
+ fields: NonNullable<WorkContribution['fields']>;
362
399
  comments: 'two-way' | 'none';
363
400
  status?: {
364
401
  webhook: string;
365
402
  map: Record<'open' | 'in_progress' | 'done', string[]>;
366
403
  };
367
- identity: 'user' | 'install';
368
404
  }
369
405
  interface ExtensionListing {
370
406
  longDescription?: string;
@@ -397,7 +433,7 @@ interface ExtensionManifest {
397
433
  connector?: ConnectorContribution;
398
434
  webhooks?: WebhookContribution[];
399
435
  ai?: AiContribution;
400
- work?: WorkContribution;
436
+ work?: WorkContribution | LegacyWorkContribution;
401
437
  };
402
438
  server?: {
403
439
  baseUrl: string;
@@ -431,4 +467,14 @@ interface TappifyExtensionOptions {
431
467
  */
432
468
  declare function tappifyExtension(options?: TappifyExtensionOptions): Plugin[];
433
469
 
434
- export { type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, tappifyExtension };
470
+ declare const PREVIEW_REMOTE_ENV = "TAPPIFY_PREVIEW_REMOTE";
471
+ type PreviewRemote = {
472
+ ok: true;
473
+ url: string;
474
+ } | {
475
+ ok: false;
476
+ message: string;
477
+ };
478
+ declare function previewRemote(remote: string | undefined, port: number): PreviewRemote;
479
+
480
+ export { PREVIEW_REMOTE_ENV, type PreviewRemote, type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, previewRemote, tappifyExtension };
package/dist/vite.d.ts CHANGED
@@ -30,6 +30,12 @@ declare const SCOPES: readonly [{
30
30
  readonly description: "Review text, ratings and replies";
31
31
  readonly requiresSecurityReview: false;
32
32
  readonly requiresJustification: false;
33
+ }, {
34
+ readonly key: "review.threads:read";
35
+ readonly label: "Read Review threads";
36
+ readonly description: "Review threads, comments, screenshot descriptors, build context and safe device context";
37
+ readonly requiresSecurityReview: false;
38
+ readonly requiresJustification: false;
33
39
  }, {
34
40
  readonly key: "crashes:read";
35
41
  readonly label: "Read crash data";
@@ -93,7 +99,7 @@ declare const SCOPES: readonly [{
93
99
  }, {
94
100
  readonly key: "work:sync";
95
101
  readonly label: "Sync work items";
96
- readonly description: "Two-way comments and status on created work items";
102
+ readonly description: "Sync comments and status on created work items";
97
103
  readonly requiresSecurityReview: false;
98
104
  readonly requiresJustification: true;
99
105
  }, {
@@ -257,6 +263,7 @@ interface CredentialField {
257
263
  options?: string[];
258
264
  help?: string;
259
265
  }
266
+ type OAuthTokenRequestEncoding = 'form' | 'json';
260
267
  interface ConnectorAuth {
261
268
  method: 'none' | 'api_key' | 'oauth';
262
269
  fields?: CredentialField[];
@@ -264,6 +271,8 @@ interface ConnectorAuth {
264
271
  authorizationUrl: string;
265
272
  tokenUrl: string;
266
273
  scopes: string[];
274
+ /** The token request body encoding. When omitted, uses form encoding. */
275
+ tokenRequestEncoding?: OAuthTokenRequestEncoding;
267
276
  };
268
277
  }
269
278
  interface DimensionDeclaration {
@@ -345,26 +354,53 @@ interface AiContribution {
345
354
  prompts?: PromptDeclaration[];
346
355
  context?: ContextDeclaration[];
347
356
  }
357
+ type WorkDirection = 'none' | 'to_provider' | 'from_provider' | 'two-way';
358
+ type WorkAuth = {
359
+ method: 'oauth';
360
+ provider: string;
361
+ scopes: string[];
362
+ } | {
363
+ method: 'api_key';
364
+ fields: CredentialField[];
365
+ };
348
366
  interface WorkContribution {
349
367
  kind: 'tracker' | 'docs' | 'chat';
350
- container: {
368
+ creates: ('issue' | 'page' | 'message')[];
369
+ identity: 'install' | 'user';
370
+ comments: 'two-way' | 'none' | {
371
+ direction: WorkDirection;
372
+ supportsEdits: false;
373
+ supportsDeletes: false;
374
+ };
375
+ status?: {
376
+ direction: WorkDirection;
377
+ webhook?: string;
378
+ map?: Record<'open' | 'in_progress' | 'done', string[]>;
379
+ };
380
+ attachments: ('image' | 'link')[];
381
+ auth: WorkAuth;
382
+ /** @deprecated resolved dynamically by describe_container */
383
+ container?: {
351
384
  label: string;
352
385
  list: string;
353
386
  };
354
- creates: ('issue' | 'page' | 'message')[];
355
- fields: {
387
+ /** @deprecated resolved dynamically by describe_container */
388
+ fields?: {
356
389
  priority?: string[];
357
390
  labels?: boolean;
358
391
  assignee?: boolean;
359
392
  required: string[];
360
393
  };
361
- attachments: ('image' | 'link')[];
394
+ }
395
+ /** @deprecated Migrate to WorkContribution during the SDK v2 compatibility window. */
396
+ interface LegacyWorkContribution extends Omit<WorkContribution, 'auth' | 'container' | 'fields' | 'comments' | 'status'> {
397
+ container: NonNullable<WorkContribution['container']>;
398
+ fields: NonNullable<WorkContribution['fields']>;
362
399
  comments: 'two-way' | 'none';
363
400
  status?: {
364
401
  webhook: string;
365
402
  map: Record<'open' | 'in_progress' | 'done', string[]>;
366
403
  };
367
- identity: 'user' | 'install';
368
404
  }
369
405
  interface ExtensionListing {
370
406
  longDescription?: string;
@@ -397,7 +433,7 @@ interface ExtensionManifest {
397
433
  connector?: ConnectorContribution;
398
434
  webhooks?: WebhookContribution[];
399
435
  ai?: AiContribution;
400
- work?: WorkContribution;
436
+ work?: WorkContribution | LegacyWorkContribution;
401
437
  };
402
438
  server?: {
403
439
  baseUrl: string;
@@ -431,4 +467,14 @@ interface TappifyExtensionOptions {
431
467
  */
432
468
  declare function tappifyExtension(options?: TappifyExtensionOptions): Plugin[];
433
469
 
434
- export { type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, tappifyExtension };
470
+ declare const PREVIEW_REMOTE_ENV = "TAPPIFY_PREVIEW_REMOTE";
471
+ type PreviewRemote = {
472
+ ok: true;
473
+ url: string;
474
+ } | {
475
+ ok: false;
476
+ message: string;
477
+ };
478
+ declare function previewRemote(remote: string | undefined, port: number): PreviewRemote;
479
+
480
+ export { PREVIEW_REMOTE_ENV, type PreviewRemote, type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, previewRemote, tappifyExtension };