@tappify/extension-sdk 2.0.0 → 2.1.0-beta.1

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-CV1qzQgx.d.cts +25 -0
  51. package/dist/client-CnlSHDWE.d.ts +25 -0
  52. package/dist/codegen.cjs.map +1 -1
  53. package/dist/codegen.d.cts +40 -7
  54. package/dist/codegen.d.ts +40 -7
  55. package/dist/codegen.mjs.map +1 -1
  56. package/dist/{constants-DJ_KgZpN.d.cts → constants-BAimnqOK.d.cts} +41 -8
  57. package/dist/{constants-DJ_KgZpN.d.ts → constants-BAimnqOK.d.ts} +41 -8
  58. package/dist/{context-Ml7k_V14.d.ts → context-Cr93B05o.d.ts} +5 -4
  59. package/dist/{context-Dt6xh_5t.d.cts → context-DJ3REtdT.d.cts} +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 +138 -85
  75. package/dist/manifest.cjs.map +1 -1
  76. package/dist/manifest.d.cts +93 -12
  77. package/dist/manifest.d.ts +93 -12
  78. package/dist/manifest.mjs +125 -72
  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-DrpQSv_2.d.cts → types-BYGcp5pZ.d.ts} +4 -3
  103. package/dist/{types-DDAGLpov.d.ts → types-I1JOZyI_.d.cts} +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 +316 -59
  124. package/dist/vite.cjs.map +1 -1
  125. package/dist/vite.d.cts +51 -8
  126. package/dist/vite.d.ts +51 -8
  127. package/dist/vite.mjs +308 -53
  128. package/dist/vite.mjs.map +1 -1
  129. package/dist/work-events-DB3WR468.d.ts +547 -0
  130. package/dist/work-events-Dxe7Djdy.d.cts +547 -0
  131. package/package.json +19 -2
  132. package/schema/extension-v2.json +432 -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
  }, {
@@ -345,26 +351,53 @@ interface AiContribution {
345
351
  prompts?: PromptDeclaration[];
346
352
  context?: ContextDeclaration[];
347
353
  }
354
+ type WorkDirection = 'none' | 'to_provider' | 'from_provider' | 'two-way';
355
+ type WorkAuth = {
356
+ method: 'oauth';
357
+ provider: string;
358
+ scopes: string[];
359
+ } | {
360
+ method: 'api_key';
361
+ fields: CredentialField[];
362
+ };
348
363
  interface WorkContribution {
349
364
  kind: 'tracker' | 'docs' | 'chat';
350
- container: {
365
+ creates: ('issue' | 'page' | 'message')[];
366
+ identity: 'install' | 'user';
367
+ comments: 'two-way' | 'none' | {
368
+ direction: WorkDirection;
369
+ supportsEdits: false;
370
+ supportsDeletes: false;
371
+ };
372
+ status?: {
373
+ direction: WorkDirection;
374
+ webhook?: string;
375
+ map?: Record<'open' | 'in_progress' | 'done', string[]>;
376
+ };
377
+ attachments: ('image' | 'link')[];
378
+ auth: WorkAuth;
379
+ /** @deprecated resolved dynamically by describe_container */
380
+ container?: {
351
381
  label: string;
352
382
  list: string;
353
383
  };
354
- creates: ('issue' | 'page' | 'message')[];
355
- fields: {
384
+ /** @deprecated resolved dynamically by describe_container */
385
+ fields?: {
356
386
  priority?: string[];
357
387
  labels?: boolean;
358
388
  assignee?: boolean;
359
389
  required: string[];
360
390
  };
361
- attachments: ('image' | 'link')[];
391
+ }
392
+ /** @deprecated Migrate to WorkContribution during the SDK v2 compatibility window. */
393
+ interface LegacyWorkContribution extends Omit<WorkContribution, 'auth' | 'container' | 'fields' | 'comments' | 'status'> {
394
+ container: NonNullable<WorkContribution['container']>;
395
+ fields: NonNullable<WorkContribution['fields']>;
362
396
  comments: 'two-way' | 'none';
363
397
  status?: {
364
398
  webhook: string;
365
399
  map: Record<'open' | 'in_progress' | 'done', string[]>;
366
400
  };
367
- identity: 'user' | 'install';
368
401
  }
369
402
  interface ExtensionListing {
370
403
  longDescription?: string;
@@ -397,7 +430,7 @@ interface ExtensionManifest {
397
430
  connector?: ConnectorContribution;
398
431
  webhooks?: WebhookContribution[];
399
432
  ai?: AiContribution;
400
- work?: WorkContribution;
433
+ work?: WorkContribution | LegacyWorkContribution;
401
434
  };
402
435
  server?: {
403
436
  baseUrl: string;
@@ -431,4 +464,14 @@ interface TappifyExtensionOptions {
431
464
  */
432
465
  declare function tappifyExtension(options?: TappifyExtensionOptions): Plugin[];
433
466
 
434
- export { type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, tappifyExtension };
467
+ declare const PREVIEW_REMOTE_ENV = "TAPPIFY_PREVIEW_REMOTE";
468
+ type PreviewRemote = {
469
+ ok: true;
470
+ url: string;
471
+ } | {
472
+ ok: false;
473
+ message: string;
474
+ };
475
+ declare function previewRemote(remote: string | undefined, port: number): PreviewRemote;
476
+
477
+ 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
  }, {
@@ -345,26 +351,53 @@ interface AiContribution {
345
351
  prompts?: PromptDeclaration[];
346
352
  context?: ContextDeclaration[];
347
353
  }
354
+ type WorkDirection = 'none' | 'to_provider' | 'from_provider' | 'two-way';
355
+ type WorkAuth = {
356
+ method: 'oauth';
357
+ provider: string;
358
+ scopes: string[];
359
+ } | {
360
+ method: 'api_key';
361
+ fields: CredentialField[];
362
+ };
348
363
  interface WorkContribution {
349
364
  kind: 'tracker' | 'docs' | 'chat';
350
- container: {
365
+ creates: ('issue' | 'page' | 'message')[];
366
+ identity: 'install' | 'user';
367
+ comments: 'two-way' | 'none' | {
368
+ direction: WorkDirection;
369
+ supportsEdits: false;
370
+ supportsDeletes: false;
371
+ };
372
+ status?: {
373
+ direction: WorkDirection;
374
+ webhook?: string;
375
+ map?: Record<'open' | 'in_progress' | 'done', string[]>;
376
+ };
377
+ attachments: ('image' | 'link')[];
378
+ auth: WorkAuth;
379
+ /** @deprecated resolved dynamically by describe_container */
380
+ container?: {
351
381
  label: string;
352
382
  list: string;
353
383
  };
354
- creates: ('issue' | 'page' | 'message')[];
355
- fields: {
384
+ /** @deprecated resolved dynamically by describe_container */
385
+ fields?: {
356
386
  priority?: string[];
357
387
  labels?: boolean;
358
388
  assignee?: boolean;
359
389
  required: string[];
360
390
  };
361
- attachments: ('image' | 'link')[];
391
+ }
392
+ /** @deprecated Migrate to WorkContribution during the SDK v2 compatibility window. */
393
+ interface LegacyWorkContribution extends Omit<WorkContribution, 'auth' | 'container' | 'fields' | 'comments' | 'status'> {
394
+ container: NonNullable<WorkContribution['container']>;
395
+ fields: NonNullable<WorkContribution['fields']>;
362
396
  comments: 'two-way' | 'none';
363
397
  status?: {
364
398
  webhook: string;
365
399
  map: Record<'open' | 'in_progress' | 'done', string[]>;
366
400
  };
367
- identity: 'user' | 'install';
368
401
  }
369
402
  interface ExtensionListing {
370
403
  longDescription?: string;
@@ -397,7 +430,7 @@ interface ExtensionManifest {
397
430
  connector?: ConnectorContribution;
398
431
  webhooks?: WebhookContribution[];
399
432
  ai?: AiContribution;
400
- work?: WorkContribution;
433
+ work?: WorkContribution | LegacyWorkContribution;
401
434
  };
402
435
  server?: {
403
436
  baseUrl: string;
@@ -431,4 +464,14 @@ interface TappifyExtensionOptions {
431
464
  */
432
465
  declare function tappifyExtension(options?: TappifyExtensionOptions): Plugin[];
433
466
 
434
- export { type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, tappifyExtension };
467
+ declare const PREVIEW_REMOTE_ENV = "TAPPIFY_PREVIEW_REMOTE";
468
+ type PreviewRemote = {
469
+ ok: true;
470
+ url: string;
471
+ } | {
472
+ ok: false;
473
+ message: string;
474
+ };
475
+ declare function previewRemote(remote: string | undefined, port: number): PreviewRemote;
476
+
477
+ export { PREVIEW_REMOTE_ENV, type PreviewRemote, type TappifyExtensionOptions, VIRTUAL_PREFIX, collectEntryStyles, inlineCssImports, previewRemote, tappifyExtension };