@diagonal-hq/cli 0.41.5 → 0.41.6

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.
@@ -1,13 +1,5 @@
1
1
  import { createRequire as __diagonalCreateRequire } from 'node:module';
2
2
  const require = __diagonalCreateRequire(import.meta.url);
3
- import {
4
- AUTHORING_MODULE,
5
- diagnostic,
6
- diagnosticAt,
7
- importKind,
8
- isAuthoringModule,
9
- unsupportedImportMessage
10
- } from "./cli-chunk-C3LVTOK3.mjs";
11
3
  import {
12
4
  __commonJS,
13
5
  __export,
@@ -290,6 +282,1056 @@ var require_jsesc = __commonJS({
290
282
  }
291
283
  });
292
284
 
285
+ // packages/cli/package-rules.json
286
+ var package_rules_default = {
287
+ package_name: "^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$",
288
+ dev_file_infix: "\\.dev(?=\\.[^/]+$)",
289
+ problems: {
290
+ package_name: '"name" must be a package name that npm installs, such as "todo" or "@acme/todo"',
291
+ diagonal_field: '"diagonal" must be an object. Write "diagonal": {} to mark a Diagonal package'
292
+ }
293
+ };
294
+
295
+ // scripts/lib/runtime-build/definition-slug.mjs
296
+ var LATIN_LETTERS = /* @__PURE__ */ new Map([
297
+ ["\xDF", "ss"],
298
+ ["\u1E9E", "ss"],
299
+ ["\xE6", "ae"],
300
+ ["\xC6", "ae"],
301
+ ["\xF8", "o"],
302
+ ["\xD8", "o"],
303
+ ["\u0153", "oe"],
304
+ ["\u0152", "oe"],
305
+ ["\u0111", "d"],
306
+ ["\u0110", "d"],
307
+ ["\u0142", "l"],
308
+ ["\u0141", "l"],
309
+ ["\xFE", "th"],
310
+ ["\xDE", "th"],
311
+ ["\xF0", "d"],
312
+ ["\xD0", "d"],
313
+ ["\u0131", "i"],
314
+ ["\u014B", "n"],
315
+ ["\u014A", "n"],
316
+ ["\u0127", "h"],
317
+ ["\u0126", "h"],
318
+ ["\u0167", "t"],
319
+ ["\u0166", "t"],
320
+ ["\u0138", "k"]
321
+ ]);
322
+ var LATIN_LETTER = new RegExp(`[${[...LATIN_LETTERS.keys()].join("")}]`, "g");
323
+ function declaredSlug(definition, option = "slug") {
324
+ const object = unwrap(definition);
325
+ if (object?.type !== "ObjectExpression") {
326
+ return { slug: null, node: null, problem: null };
327
+ }
328
+ const property = object.properties.find((item) => item.type === "ObjectProperty" && optionName(item) === option);
329
+ if (property === void 0) {
330
+ return { slug: null, node: null, problem: null };
331
+ }
332
+ const value = unwrap(property.value);
333
+ if (value.type === "StringLiteral") {
334
+ return { slug: value.value, node: property.value, problem: null };
335
+ }
336
+ if (value.type === "TemplateLiteral" && value.expressions.length === 0) {
337
+ return { slug: value.quasis[0].value.cooked, node: property.value, problem: null };
338
+ }
339
+ return {
340
+ slug: null,
341
+ node: property.value,
342
+ problem: `"${option}" must be a string literal, because the build reads it before it builds the files`
343
+ };
344
+ }
345
+ function unwrap(node) {
346
+ let current = node;
347
+ while (current?.type === "TSAsExpression" || current?.type === "TSSatisfiesExpression") {
348
+ current = current.expression;
349
+ }
350
+ return current;
351
+ }
352
+ function optionName(property) {
353
+ if (property.key.type === "StringLiteral") {
354
+ return property.key.value;
355
+ }
356
+ return !property.computed && property.key.type === "Identifier" ? property.key.name : null;
357
+ }
358
+ var DEV_INFIX = new RegExp(package_rules_default.dev_file_infix);
359
+ function isDevPath(path) {
360
+ return DEV_INFIX.test(path);
361
+ }
362
+ function withoutDevInfix(path) {
363
+ return path.replace(DEV_INFIX, "");
364
+ }
365
+
366
+ // scripts/lib/runtime-build/diagnostics.mjs
367
+ var BUILD_STAGE = "build";
368
+ function diagnostic(path, line, column, message, { stage = BUILD_STAGE, severity = "error", relatedPath } = {}) {
369
+ const result = { path, line, column, severity, message, stage };
370
+ if (relatedPath !== void 0) {
371
+ result.related_path = relatedPath;
372
+ }
373
+ return result;
374
+ }
375
+ function diagnosticAt(path, node, message, options) {
376
+ const start = node?.loc?.start;
377
+ return diagnostic(node?.loc?.filename ?? path, start ? start.line : 1, start ? start.column + 1 : 1, message, options);
378
+ }
379
+ function hasErrors(diagnostics) {
380
+ return diagnostics.some((diagnostic2) => diagnostic2.severity === "error");
381
+ }
382
+ function sortDiagnostics(diagnostics) {
383
+ return diagnostics.toSorted(
384
+ (left, right) => left.path.localeCompare(right.path) || left.line - right.line || left.column - right.column
385
+ );
386
+ }
387
+
388
+ // app/pages/resources/js/pageRuntime/sdk/generated/sdkExports.ts
389
+ var PAGES_SDK_PACKAGE = "@diagonal-hq/pages";
390
+ var PAGE_SDK_FILE_ONLY_EXPORTS = Object.freeze(["defineMenu", "useMenu"]);
391
+ var PAGE_SDK_FILE_TYPED_EXPORTS = Object.freeze(["defineMenu", "useMenu", "utils"]);
392
+ var PAGE_SDK_EXPORTS = Object.freeze({
393
+ Accordion: ["Components", "Accordion"],
394
+ AdminNavButtons: ["Components", "AdminNavButtons"],
395
+ AiAgentButton: ["Components", "AiAgentButton"],
396
+ AiChatButton: ["Components", "AiChatButton"],
397
+ Alert: ["Components", "Alert"],
398
+ AnalyticsEmbed: ["Components", "AnalyticsEmbed"],
399
+ Avatar: ["Components", "Avatar"],
400
+ Badge: ["Components", "Badge"],
401
+ BarChart: ["Components", "BarChart"],
402
+ Breadcrumb: ["Components", "Breadcrumb"],
403
+ Button: ["Components", "Button"],
404
+ ButtonLink: ["Components", "ButtonLink"],
405
+ Calendar: ["Components", "Calendar"],
406
+ CalendarConnections: ["Components", "CalendarConnections"],
407
+ CalendarNextButton: ["Components", "CalendarNextButton"],
408
+ CalendarPrevButton: ["Components", "CalendarPrevButton"],
409
+ CalendarSelector: ["Components", "CalendarSelector"],
410
+ CalendarTitle: ["Components", "CalendarTitle"],
411
+ CalendarTodayButton: ["Components", "CalendarTodayButton"],
412
+ CalendarViewSwitcher: ["Components", "CalendarViewSwitcher"],
413
+ Card: ["Components", "Card"],
414
+ Collapsible: ["Components", "Collapsible"],
415
+ ConfirmDialog: ["Components", "ConfirmDialog"],
416
+ CreateResourceRecordForm: ["Components", "CreateResourceRecordForm"],
417
+ DataTable: ["Components", "DataTable"],
418
+ DataTableAddFilter: ["Components", "DataTableAddFilter"],
419
+ DataTableBulkActions: ["Components", "DataTableBulkActions"],
420
+ DataTableColumnToggle: ["Components", "DataTableColumnToggle"],
421
+ DataTableContent: ["Components", "DataTableContent"],
422
+ DataTableFilterChips: ["Components", "DataTableFilterChips"],
423
+ DataTableFilters: ["Components", "DataTableFilters"],
424
+ DataTablePagination: ["Components", "DataTablePagination"],
425
+ DataTableRowActions: ["Components", "DataTableRowActions"],
426
+ DataTableSearch: ["Components", "DataTableSearch"],
427
+ DataTableToolbar: ["Components", "DataTableToolbar"],
428
+ DeleteResourceRecord: ["Components", "DeleteResourceRecord"],
429
+ Dnd: ["Dnd"],
430
+ DropdownMenu: ["Components", "DropdownMenu"],
431
+ EmailComposer: ["Components", "EmailComposer"],
432
+ EmailMessages: ["Components", "EmailMessages"],
433
+ EmptyState: ["Components", "EmptyState"],
434
+ ErrorBoundary: ["Components", "ErrorBoundary"],
435
+ FilterPresets: ["Components", "FilterPresets"],
436
+ ForgotPasswordForm: ["Components", "ForgotPasswordForm"],
437
+ FormCheckbox: ["Components", "FormCheckbox"],
438
+ FormCheckboxGroupInput: ["Components", "FormCheckboxGroupInput"],
439
+ FormCodeInput: ["Components", "FormCodeInput"],
440
+ FormColorInput: ["Components", "FormColorInput"],
441
+ FormComboboxInput: ["Components", "FormComboboxInput"],
442
+ FormContentInput: ["Components", "FormContentInput"],
443
+ FormDateInput: ["Components", "FormDateInput"],
444
+ FormDatetimeInput: ["Components", "FormDatetimeInput"],
445
+ FormFieldDisplay: ["Components", "FormFieldDisplay"],
446
+ FormFieldInput: ["Components", "FormFieldInput"],
447
+ FormFileUpload: ["Components", "FormFileUpload"],
448
+ FormLocationInput: ["Components", "FormLocationInput"],
449
+ FormMarkdownInput: ["Components", "FormMarkdownInput"],
450
+ FormMoneyInput: ["Components", "FormMoneyInput"],
451
+ FormMultiComboboxInput: ["Components", "FormMultiComboboxInput"],
452
+ FormNumberInput: ["Components", "FormNumberInput"],
453
+ FormPasswordInput: ["Components", "FormPasswordInput"],
454
+ FormPhoneInput: ["Components", "FormPhoneInput"],
455
+ FormRadio: ["Components", "FormRadio"],
456
+ FormSelectInput: ["Components", "FormSelectInput"],
457
+ FormSlider: ["Components", "FormSlider"],
458
+ FormSwitch: ["Components", "FormSwitch"],
459
+ FormTextArea: ["Components", "FormTextArea"],
460
+ FormTextInput: ["Components", "FormTextInput"],
461
+ FormTimeInput: ["Components", "FormTimeInput"],
462
+ FormTimezoneInput: ["Components", "FormTimezoneInput"],
463
+ HasAnyPermission: ["Components", "HasAnyPermission"],
464
+ HasPermission: ["Components", "HasPermission"],
465
+ Icon: ["Components", "Icon"],
466
+ Iframe: ["Components", "Iframe"],
467
+ Image: ["Components", "Image"],
468
+ KeyValueList: ["Components", "KeyValueList"],
469
+ LineChart: ["Components", "LineChart"],
470
+ Link: ["Components", "Link"],
471
+ List: ["Components", "List"],
472
+ LoginForm: ["Components", "LoginForm"],
473
+ LogoutButton: ["Components", "LogoutButton"],
474
+ Map: ["Components", "Map"],
475
+ Modal: ["Components", "Modal"],
476
+ NavMain: ["Components", "NavMain"],
477
+ NotificationComposer: ["Components", "NotificationComposer"],
478
+ NotificationConsentForm: ["Components", "NotificationConsentForm"],
479
+ NotificationHistory: ["Components", "NotificationHistory"],
480
+ NotificationVariablesForm: ["Components", "NotificationVariablesForm"],
481
+ PackageReleaseNotes: ["Components", "PackageReleaseNotes"],
482
+ PageHeader: ["Components", "PageHeader"],
483
+ PaymentForm: ["Components", "PaymentForm"],
484
+ PaymentMethods: ["Components", "PaymentMethods"],
485
+ PieChart: ["Components", "PieChart"],
486
+ Popover: ["Components", "Popover"],
487
+ QrCode: ["Components", "QrCode"],
488
+ RecordFields: ["Components", "RecordFields"],
489
+ RecordScheduleDisplay: ["Components", "RecordScheduleDisplay"],
490
+ ResourceTable: ["Components", "ResourceTable"],
491
+ RestoreResourceRecord: ["Components", "RestoreResourceRecord"],
492
+ RichText: ["Components", "RichText"],
493
+ ScheduledNotificationComposer: ["Components", "ScheduledNotificationComposer"],
494
+ SearchBar: ["Components", "SearchBar"],
495
+ Separator: ["Components", "Separator"],
496
+ SharedFilters: ["Components", "SharedFilters"],
497
+ ShowResourceRecord: ["Components", "ShowResourceRecord"],
498
+ Sidebar: ["Components", "Sidebar"],
499
+ SidebarCollapseButton: ["Components", "SidebarCollapseButton"],
500
+ SidebarContent: ["Components", "SidebarContent"],
501
+ SidebarFooter: ["Components", "SidebarFooter"],
502
+ SidebarHeader: ["Components", "SidebarHeader"],
503
+ SidebarInset: ["Components", "SidebarInset"],
504
+ SidebarMenu: ["Components", "SidebarMenu"],
505
+ SidebarMenuButton: ["Components", "SidebarMenuButton"],
506
+ SidebarMenuItem: ["Components", "SidebarMenuItem"],
507
+ SidebarProvider: ["Components", "SidebarProvider"],
508
+ SidebarTrigger: ["Components", "SidebarTrigger"],
509
+ SimpleTable: ["Components", "SimpleTable"],
510
+ Skeleton: ["Components", "Skeleton"],
511
+ Slideover: ["Components", "Slideover"],
512
+ SlotPicker: ["Components", "SlotPicker"],
513
+ Spinner: ["Components", "Spinner"],
514
+ StatCard: ["Components", "StatCard"],
515
+ Step: ["Components", "Step"],
516
+ Stepper: ["Components", "Stepper"],
517
+ SubscriptionBillingPreview: ["Components", "SubscriptionBillingPreview"],
518
+ SubscriptionChangePreview: ["Components", "SubscriptionChangePreview"],
519
+ SupportChatButton: ["Components", "SupportChatButton"],
520
+ Tabs: ["Components", "Tabs"],
521
+ ThemeToggle: ["Components", "ThemeToggle"],
522
+ Timer: ["Components", "Timer"],
523
+ Tooltip: ["Components", "Tooltip"],
524
+ TwoFactorBackupCodeList: ["Components", "TwoFactorBackupCodeList"],
525
+ TwoFactorBackupCodes: ["Components", "TwoFactorBackupCodes"],
526
+ TwoFactorChallenge: ["Components", "TwoFactorChallenge"],
527
+ TwoFactorSendCodeButton: ["Components", "TwoFactorSendCodeButton"],
528
+ TwoFactorSetup: ["Components", "TwoFactorSetup"],
529
+ TwoFactorSmsConsent: ["Components", "TwoFactorSmsConsent"],
530
+ UpdateResourceRecordForm: ["Components", "UpdateResourceRecordForm"],
531
+ UserMenu: ["Components", "UserMenu"],
532
+ Video: ["Components", "Video"],
533
+ WorkflowForm: ["Components", "WorkflowForm"],
534
+ WorkspaceFieldsForm: ["Components", "WorkspaceFieldsForm"],
535
+ api: ["api"],
536
+ auth: ["auth"],
537
+ defineMenu: ["defineMenu"],
538
+ getInput: ["helpers", "getInput"],
539
+ getRouteBinding: ["helpers", "getRouteBinding"],
540
+ getRouteParam: ["helpers", "getRouteParam"],
541
+ getRouteParams: ["helpers", "getRouteParams"],
542
+ identity: ["identity"],
543
+ page: ["page"],
544
+ permissions: ["permissions"],
545
+ resource: ["resource"],
546
+ resourceId: ["resourceId"],
547
+ resourceIds: ["resourceIds"],
548
+ resourceOrNull: ["resourceOrNull"],
549
+ router: ["router"],
550
+ useAccountingEntities: ["hooks", "useAccountingEntities"],
551
+ useAiChat: ["hooks", "useAiChat"],
552
+ useAnalytics: ["hooks", "useAnalytics"],
553
+ useApi: ["hooks", "useApi"],
554
+ useAvailability: ["hooks", "useAvailability"],
555
+ useAvailableSlots: ["hooks", "useAvailableSlots"],
556
+ useBulkNotificationRun: ["hooks", "useBulkNotificationRun"],
557
+ useCalendarConnections: ["hooks", "useCalendarConnections"],
558
+ useCalendarEvents: ["hooks", "useCalendarEvents"],
559
+ useCalendarSelection: ["hooks", "useCalendarSelection"],
560
+ useCalendarView: ["hooks", "useCalendarView"],
561
+ useCancelScheduledNotification: ["hooks", "useCancelScheduledNotification"],
562
+ useCreateRecord: ["hooks", "useCreateRecord"],
563
+ useCreateResourceRecordForm: ["hooks", "useCreateResourceRecordForm"],
564
+ useDataTable: ["hooks", "useDataTable"],
565
+ useDeleteResourceRecord: ["hooks", "useDeleteResourceRecord"],
566
+ useEmailMessages: ["hooks", "useEmailMessages"],
567
+ useFilterPresets: ["hooks", "useFilterPresets"],
568
+ useForm: ["useForm"],
569
+ useHoldScheduledNotification: ["hooks", "useHoldScheduledNotification"],
570
+ useInfiniteRecords: ["hooks", "useInfiniteRecords"],
571
+ useInput: ["helpers", "useInput"],
572
+ useInvalidateAll: ["hooks", "useInvalidateAll"],
573
+ useLocalStorage: ["hooks", "useLocalStorage"],
574
+ useMenu: ["useMenu"],
575
+ useNewCalendarEvent: ["hooks", "useNewCalendarEvent"],
576
+ useNotificationConsent: ["hooks", "useNotificationConsent"],
577
+ useNotificationHistory: ["hooks", "useNotificationHistory"],
578
+ useNotificationHistoryDetail: ["hooks", "useNotificationHistoryDetail"],
579
+ useNotificationTemplate: ["hooks", "useNotificationTemplate"],
580
+ useNotificationTemplateEmailDraft: ["hooks", "useNotificationTemplateEmailDraft"],
581
+ useNotificationTemplates: ["hooks", "useNotificationTemplates"],
582
+ useNotificationTypes: ["hooks", "useNotificationTypes"],
583
+ usePackageReleaseNotes: ["hooks", "usePackageReleaseNotes"],
584
+ usePayerBalances: ["hooks", "usePayerBalances"],
585
+ usePaymentRefundPreview: ["hooks", "usePaymentRefundPreview"],
586
+ usePoll: ["hooks", "usePoll"],
587
+ usePreviewScheduledNotification: ["hooks", "usePreviewScheduledNotification"],
588
+ useQueryParams: ["hooks", "useQueryParams"],
589
+ useRecord: ["hooks", "useRecord"],
590
+ useRecordScheduleTimelines: ["hooks", "useRecordScheduleTimelines"],
591
+ useRecords: ["hooks", "useRecords"],
592
+ useResourceDataTable: ["hooks", "useResourceDataTable"],
593
+ useRestoreResourceRecord: ["hooks", "useRestoreResourceRecord"],
594
+ useResumeScheduledNotification: ["hooks", "useResumeScheduledNotification"],
595
+ useSaveNotificationTemplate: ["hooks", "useSaveNotificationTemplate"],
596
+ useScheduleConflicts: ["hooks", "useScheduleConflicts"],
597
+ useScheduleNotification: ["hooks", "useScheduleNotification"],
598
+ useScheduledNotification: ["hooks", "useScheduledNotification"],
599
+ useSendBulkNotifications: ["hooks", "useSendBulkNotifications"],
600
+ useSendEmail: ["hooks", "useSendEmail"],
601
+ useSendNotification: ["hooks", "useSendNotification"],
602
+ useSendResolvedNotification: ["hooks", "useSendResolvedNotification"],
603
+ useSendScheduledNotificationNow: ["hooks", "useSendScheduledNotificationNow"],
604
+ useSharedFilters: ["hooks", "useSharedFilters"],
605
+ useSidebar: ["hooks", "useSidebar"],
606
+ useStepper: ["hooks", "useStepper"],
607
+ useSubscriptionChangePreview: ["hooks", "useSubscriptionChangePreview"],
608
+ useSubscriptionPreview: ["hooks", "useSubscriptionPreview"],
609
+ useTheme: ["hooks", "useTheme"],
610
+ useTwoFactorBackupCodes: ["hooks", "useTwoFactorBackupCodes"],
611
+ useTwoFactorChallenge: ["hooks", "useTwoFactorChallenge"],
612
+ useTwoFactorSetup: ["hooks", "useTwoFactorSetup"],
613
+ useUpcomingNotifications: ["hooks", "useUpcomingNotifications"],
614
+ useUpdateRecord: ["hooks", "useUpdateRecord"],
615
+ useUpdateResourceRecordForm: ["hooks", "useUpdateResourceRecordForm"],
616
+ useUpdateScheduledNotification: ["hooks", "useUpdateScheduledNotification"],
617
+ useWorkflowAction: ["hooks", "useWorkflowAction"],
618
+ useWorkflowForm: ["hooks", "useWorkflowForm"],
619
+ useWorkspaceFieldsForm: ["hooks", "useWorkspaceFieldsForm"],
620
+ useWorkspaceValues: ["hooks", "useWorkspaceValues"],
621
+ utils: ["utils"],
622
+ workspace: ["workspace"]
623
+ });
624
+ var PAGE_SDK_TYPES = {
625
+ AccountingEntities: { "parameters": "", "arguments": "" },
626
+ AccountingEntity: { "parameters": "", "arguments": "" },
627
+ AddCalendarLinkInput: { "parameters": "", "arguments": "" },
628
+ AnalyticsDistributionParams: { "parameters": "", "arguments": "" },
629
+ AnalyticsGranularity: { "parameters": "", "arguments": "" },
630
+ AnalyticsHandle: { "parameters": "<TResult>", "arguments": "<TResult>" },
631
+ AnalyticsKpiParams: { "parameters": '<TMetrics extends readonly import("diagonal:sdk-internal").AnalyticsMetric[] = import("diagonal:sdk-internal").AnalyticsMetric[]>', "arguments": "<TMetrics>" },
632
+ AnalyticsKpiResult: { "parameters": '<TMetrics extends readonly import("diagonal:sdk-internal").AnalyticsMetric[] = import("diagonal:sdk-internal").AnalyticsMetric[]>', "arguments": "<TMetrics>" },
633
+ AnalyticsLeaderboardParams: { "parameters": "", "arguments": "" },
634
+ AnalyticsMetric: { "parameters": "", "arguments": "" },
635
+ AnalyticsResource: { "parameters": '<TKind extends keyof import("diagonal:sdk-internal").SdkResourceAnalytics>', "arguments": "<TKind>" },
636
+ AnalyticsRow: { "parameters": "", "arguments": "" },
637
+ AnalyticsTimeSeriesMetric: { "parameters": "", "arguments": "" },
638
+ AnalyticsTimeSeriesParams: { "parameters": "", "arguments": "" },
639
+ AnalyticsValue: { "parameters": "", "arguments": "" },
640
+ Api: { "parameters": "", "arguments": "" },
641
+ ApiError: { "parameters": "", "arguments": "" },
642
+ ApiErrorBody: { "parameters": "", "arguments": "" },
643
+ ApiFetcher: { "parameters": "<TData>", "arguments": "<TData>" },
644
+ ApiHandle: { "parameters": "<TData>", "arguments": "<TData>" },
645
+ ApiQueryKey: { "parameters": "", "arguments": "" },
646
+ Auth: { "parameters": "", "arguments": "" },
647
+ AuthConfig: { "parameters": "", "arguments": "" },
648
+ AuthLoginInput: { "parameters": "", "arguments": "" },
649
+ AuthMagicLinkInput: { "parameters": "", "arguments": "" },
650
+ AuthPasswordResetInput: { "parameters": "", "arguments": "" },
651
+ AuthResource: { "parameters": "", "arguments": "" },
652
+ AvailabilityHandle: { "parameters": "", "arguments": "" },
653
+ AvailabilityOptions: { "parameters": "", "arguments": "" },
654
+ AvailabilityPiece: { "parameters": "", "arguments": "" },
655
+ AvailableSlot: { "parameters": "", "arguments": "" },
656
+ AvailableSlotsHandle: { "parameters": "", "arguments": "" },
657
+ AvailableSlotsOptions: { "parameters": "", "arguments": "" },
658
+ BadgeVariant: { "parameters": "", "arguments": "" },
659
+ BookingCreateResult: { "parameters": "", "arguments": "" },
660
+ BrandLogoOptions: { "parameters": "", "arguments": "" },
661
+ BulkNotificationRun: { "parameters": "", "arguments": "" },
662
+ BulkNotificationVariable: { "parameters": "", "arguments": "" },
663
+ CalendarAccessRole: { "parameters": "", "arguments": "" },
664
+ CalendarChoice: { "parameters": "", "arguments": "" },
665
+ CalendarChoices: { "parameters": "", "arguments": "" },
666
+ CalendarConnectionsHandle: { "parameters": "", "arguments": "" },
667
+ CalendarEventsChoice: { "parameters": "", "arguments": "" },
668
+ CalendarLink: { "parameters": "", "arguments": "" },
669
+ CalendarLinkFlags: { "parameters": "", "arguments": "" },
670
+ CalendarLinkState: { "parameters": "", "arguments": "" },
671
+ CalendarLinks: { "parameters": "", "arguments": "" },
672
+ CalendarLogin: { "parameters": "", "arguments": "" },
673
+ CalendarResult: { "parameters": "", "arguments": "" },
674
+ CalendarSignInResult: { "parameters": "", "arguments": "" },
675
+ CalendarStaff: { "parameters": "", "arguments": "" },
676
+ CalendarUnavailableReason: { "parameters": "", "arguments": "" },
677
+ CancelScheduledNotificationHandle: { "parameters": "", "arguments": "" },
678
+ CancelledNotificationResult: { "parameters": "", "arguments": "" },
679
+ CatalogRecord: { "parameters": '<TResourceId extends string, TRelations extends readonly import("diagonal:sdk-internal").SdkCatalogRelationPath<TResourceId>[] = readonly []>', "arguments": "<TResourceId, TRelations>" },
680
+ CatalogRelationPath: { "parameters": "<TResourceId extends string>", "arguments": "<TResourceId>" },
681
+ ClassValue: { "parameters": "", "arguments": "" },
682
+ ClipboardCopyOptions: { "parameters": "", "arguments": "" },
683
+ ConfettiOptions: { "parameters": "", "arguments": "" },
684
+ ContentValue: { "parameters": "", "arguments": "" },
685
+ Contract: { "parameters": "", "arguments": "" },
686
+ CreateRecordHandle: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
687
+ DateAddUnit: { "parameters": "", "arguments": "" },
688
+ DateBoundaryUnit: { "parameters": "", "arguments": "" },
689
+ DisplayFormatOptions: { "parameters": "", "arguments": "" },
690
+ DisplayPriceOptions: { "parameters": "", "arguments": "" },
691
+ DisplayUtils: { "parameters": "", "arguments": "" },
692
+ Dnd: { "parameters": "", "arguments": "" },
693
+ DndCanDrag: { "parameters": '<TItem, TLocation extends import("diagonal:sdk-internal").SdkDndLocation = import("diagonal:sdk-internal").SdkDndLocation>', "arguments": "<TItem, TLocation>" },
694
+ DndCanDrop: { "parameters": '<TItem, TLocation extends import("diagonal:sdk-internal").SdkDndLocation = import("diagonal:sdk-internal").SdkDndLocation>', "arguments": "<TItem, TLocation>" },
695
+ DndCustomPersistence: { "parameters": "<TItem>", "arguments": "<TItem>" },
696
+ DndGroupMoveChange: { "parameters": "<TItem>", "arguments": "<TItem>" },
697
+ DndGroupMoveResult: { "parameters": "<TItem>", "arguments": "<TItem>" },
698
+ DndGroupedLocation: { "parameters": "", "arguments": "" },
699
+ DndIdentifier: { "parameters": "", "arguments": "" },
700
+ DndItemIdentifier: { "parameters": "<TItem>", "arguments": "<TItem>" },
701
+ DndLocation: { "parameters": "", "arguments": "" },
702
+ DndMoveContext: { "parameters": '<TItem, TLocation extends import("diagonal:sdk-internal").SdkDndLocation = import("diagonal:sdk-internal").SdkDndLocation>', "arguments": "<TItem, TLocation>" },
703
+ DndReorder: { "parameters": "", "arguments": "" },
704
+ DndReorderChange: { "parameters": "<TItem>", "arguments": "<TItem>" },
705
+ DndReorderResult: { "parameters": "<TItem>", "arguments": "<TItem>" },
706
+ DndResourcePersistence: { "parameters": "<TItem>", "arguments": "<TItem>" },
707
+ DndSortableGroupRenderState: { "parameters": "<TItem>", "arguments": "<TItem>" },
708
+ DndSortableGroupsCommonProps: { "parameters": "<TItem, TGroup>", "arguments": "<TItem, TGroup>" },
709
+ DndSortableGroupsComponent: { "parameters": "", "arguments": "" },
710
+ DndSortableGroupsCustomPersistence: { "parameters": "<TItem, TGroup>", "arguments": "<TItem, TGroup>" },
711
+ DndSortableGroupsProps: { "parameters": "<TItem, TGroup>", "arguments": "<TItem, TGroup>" },
712
+ DndSortableGroupsResourcePersistence: { "parameters": "<TItem, TGroup>", "arguments": "<TItem, TGroup>" },
713
+ DndSortableGroupsResourceProps: { "parameters": `<TResource extends import("diagonal:sdk-internal").SdkResourceType & Pick<import("diagonal:sdk-internal").SdkResource, 'fields' | 'updateMany'>, TItem extends import("diagonal:sdk-internal").SdkDndResourceItem<NoInfer<TResource>>, TGroup>`, "arguments": "<TResource, TItem, TGroup>" },
714
+ DndSortableItem: { "parameters": "", "arguments": "" },
715
+ DndSortableListCommonProps: { "parameters": "<TItem>", "arguments": "<TItem>" },
716
+ DndSortableListComponent: { "parameters": "", "arguments": "" },
717
+ DndSortableListProps: { "parameters": "<TItem>", "arguments": "<TItem>" },
718
+ DndSortableListResourceProps: { "parameters": `<TResource extends import("diagonal:sdk-internal").SdkResourceType & Pick<import("diagonal:sdk-internal").SdkResource, 'fields' | 'updateMany'>, TItem extends import("diagonal:sdk-internal").SdkDndResourceItem<NoInfer<TResource>> = import("diagonal:sdk-internal").SdkDndResourceItem<TResource>>`, "arguments": "<TResource, TItem>" },
719
+ DndSortableOptions: { "parameters": "<TItem>", "arguments": "<TItem>" },
720
+ DndSortableRenderState: { "parameters": "", "arguments": "" },
721
+ EmailAddress: { "parameters": "", "arguments": "" },
722
+ EmailAttempt: { "parameters": "", "arguments": "" },
723
+ EmailAttemptAttachment: { "parameters": "", "arguments": "" },
724
+ EmailAttemptEvent: { "parameters": "", "arguments": "" },
725
+ EmailAttemptRecipients: { "parameters": "", "arguments": "" },
726
+ EmailAttemptStatus: { "parameters": "", "arguments": "" },
727
+ EmailMessage: { "parameters": "", "arguments": "" },
728
+ EmailMessages: { "parameters": "", "arguments": "" },
729
+ EmailMessagesFilters: { "parameters": "", "arguments": "" },
730
+ EmailMessagesOptions: { "parameters": "", "arguments": "" },
731
+ EmailMessagesRecord: { "parameters": "", "arguments": "" },
732
+ EmailRecipient: { "parameters": "", "arguments": "" },
733
+ EmailRecipientRole: { "parameters": "", "arguments": "" },
734
+ EventScheduleValue: { "parameters": "", "arguments": "" },
735
+ FieldSelector: { "parameters": "<TKey extends string = string>", "arguments": "<TKey>" },
736
+ FieldValue: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord, TSelector extends import("diagonal:sdk-internal").SdkFieldSelector>', "arguments": "<TRecord, TSelector>" },
737
+ FormField: { "parameters": "", "arguments": "" },
738
+ FormFieldProps: { "parameters": "", "arguments": "" },
739
+ FormWrapperProps: { "parameters": "", "arguments": "" },
740
+ GoogleCalendarLoginStatus: { "parameters": "", "arguments": "" },
741
+ HeldNotificationResult: { "parameters": "", "arguments": "" },
742
+ Helpers: { "parameters": "", "arguments": "" },
743
+ HoldScheduledNotificationHandle: { "parameters": "", "arguments": "" },
744
+ Hooks: { "parameters": "", "arguments": "" },
745
+ Identity: { "parameters": "", "arguments": "" },
746
+ InfiniteRecordsHandle: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
747
+ ListItemField: { "parameters": "", "arguments": "" },
748
+ LocalStorageArray: { "parameters": "", "arguments": "" },
749
+ LocalStorageObject: { "parameters": "", "arguments": "" },
750
+ LocalStoragePrimitive: { "parameters": "", "arguments": "" },
751
+ LocalStorageResult: { "parameters": "<TValue>", "arguments": "<TValue>" },
752
+ LocalStorageSetter: { "parameters": "<TValue>", "arguments": "<TValue>" },
753
+ LocalStorageValue: { "parameters": "", "arguments": "" },
754
+ LocationFormatOptions: { "parameters": "", "arguments": "" },
755
+ LocationValue: { "parameters": "", "arguments": "" },
756
+ Menu: { "parameters": '<E extends import("diagonal:sdk-internal").SdkMenuExtra = Record<never, never>>', "arguments": "<E>" },
757
+ MenuContext: { "parameters": "", "arguments": "" },
758
+ MenuExtra: { "parameters": "", "arguments": "" },
759
+ MenuItem: { "parameters": "", "arguments": "" },
760
+ MenuResult: { "parameters": "", "arguments": "" },
761
+ Money: { "parameters": "", "arguments": "" },
762
+ MoneyFormatOptions: { "parameters": "", "arguments": "" },
763
+ MoneyInput: { "parameters": "", "arguments": "" },
764
+ NavigateOptions: { "parameters": "", "arguments": "" },
765
+ NavigationMenu: { "parameters": "", "arguments": "" },
766
+ NavigationMenuCatalog: { "parameters": "", "arguments": "" },
767
+ NotificationChannel: { "parameters": "", "arguments": "" },
768
+ NotificationChannelAvailability: { "parameters": "", "arguments": "" },
769
+ NotificationChannelUnavailableReason: { "parameters": "", "arguments": "" },
770
+ NotificationChannels: { "parameters": "", "arguments": "" },
771
+ NotificationConsent: { "parameters": "", "arguments": "" },
772
+ NotificationConsentChannels: { "parameters": "", "arguments": "" },
773
+ NotificationConsentHandle: { "parameters": "", "arguments": "" },
774
+ NotificationDeliveryChannel: { "parameters": "", "arguments": "" },
775
+ NotificationHistory: { "parameters": "", "arguments": "" },
776
+ NotificationHistoryDetail: { "parameters": "", "arguments": "" },
777
+ NotificationHistoryItem: { "parameters": "", "arguments": "" },
778
+ NotificationHistoryKind: { "parameters": "", "arguments": "" },
779
+ NotificationHistoryOptions: { "parameters": "", "arguments": "" },
780
+ NotificationHistoryRecord: { "parameters": "", "arguments": "" },
781
+ NotificationHistoryStatus: { "parameters": "", "arguments": "" },
782
+ NotificationListOptions: { "parameters": "", "arguments": "" },
783
+ NotificationRecipient: { "parameters": "", "arguments": "" },
784
+ NotificationSourceKind: { "parameters": "", "arguments": "" },
785
+ NotificationTemplateContent: { "parameters": "", "arguments": "" },
786
+ NotificationTemplateDefinition: { "parameters": "", "arguments": "" },
787
+ NotificationTemplateEmailDraft: { "parameters": "", "arguments": "" },
788
+ NotificationTemplateList: { "parameters": "", "arguments": "" },
789
+ NotificationTemplateReference: { "parameters": "", "arguments": "" },
790
+ NotificationTemplateSummary: { "parameters": "", "arguments": "" },
791
+ NotificationTypeList: { "parameters": "", "arguments": "" },
792
+ NotificationTypeListOptions: { "parameters": "", "arguments": "" },
793
+ NotificationTypeSummary: { "parameters": "", "arguments": "" },
794
+ NotificationVariableSummary: { "parameters": "", "arguments": "" },
795
+ NotifyToastOptions: { "parameters": "", "arguments": "" },
796
+ NotifyVariant: { "parameters": "", "arguments": "" },
797
+ NumberFormatOptions: { "parameters": "", "arguments": "" },
798
+ PackageReleaseHistory: { "parameters": "", "arguments": "" },
799
+ PackageReleaseNotes: { "parameters": "", "arguments": "" },
800
+ PackageReleaseNotesOptions: { "parameters": "", "arguments": "" },
801
+ PackageReleaseNotesProps: { "parameters": "", "arguments": "" },
802
+ PageAliasCatalog: { "parameters": "", "arguments": "" },
803
+ PageHandle: { "parameters": "", "arguments": "" },
804
+ PageReference: { "parameters": "", "arguments": "" },
805
+ PageRouteSettings: { "parameters": "", "arguments": "" },
806
+ PayerBalances: { "parameters": "", "arguments": "" },
807
+ PayerBalancesOptions: { "parameters": "", "arguments": "" },
808
+ PayerEntityBalance: { "parameters": "", "arguments": "" },
809
+ PaymentRefundPreview: { "parameters": "", "arguments": "" },
810
+ PaymentRefundPreviewHandle: { "parameters": "", "arguments": "" },
811
+ PaymentRefundPreviewOptions: { "parameters": "", "arguments": "" },
812
+ Permissions: { "parameters": "", "arguments": "" },
813
+ PhoneFormatOptions: { "parameters": "", "arguments": "" },
814
+ PointValue: { "parameters": "", "arguments": "" },
815
+ PollControls: { "parameters": "", "arguments": "" },
816
+ PollInterval: { "parameters": "<TData>", "arguments": "<TData>" },
817
+ PreviewNotificationInput: { "parameters": "", "arguments": "" },
818
+ PreviewNotificationResponse: { "parameters": "", "arguments": "" },
819
+ RecordAvailability: { "parameters": "", "arguments": "" },
820
+ RecordHandle: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
821
+ RecordInput: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
822
+ RecordMutationState: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
823
+ RecordOf: { "parameters": '<TKey extends keyof import("diagonal:sdk-internal").ResourceRecordCatalog>', "arguments": "<TKey>" },
824
+ RecordScheduleTimeline: { "parameters": "", "arguments": "" },
825
+ RecordScheduleTimelineOffset: { "parameters": "", "arguments": "" },
826
+ RecordScheduleTimelinesHandle: { "parameters": "", "arguments": "" },
827
+ RecordsHandle: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
828
+ RecurrenceDefinition: { "parameters": "", "arguments": "" },
829
+ RecurrenceValue: { "parameters": "", "arguments": "" },
830
+ ReferenceRecord: { "parameters": '<TReference extends import("diagonal:sdk-internal").ResourceTypeReference, TRelations extends readonly import("diagonal:sdk-internal").SdkReferenceRelationPath<TReference>[] = readonly []>', "arguments": "<TReference, TRelations>" },
831
+ ReferenceRelationPath: { "parameters": '<TReference extends import("diagonal:sdk-internal").ResourceTypeReference>', "arguments": "<TReference>" },
832
+ RegularHoursDay: { "parameters": "", "arguments": "" },
833
+ RegularHoursValue: { "parameters": "", "arguments": "" },
834
+ ResolvedMenuItem: { "parameters": "", "arguments": "" },
835
+ ResolvedNotification: { "parameters": "", "arguments": "" },
836
+ ResolvedNotificationEmail: { "parameters": "", "arguments": "" },
837
+ Resource: { "parameters": '<TFields extends Record<string, import("diagonal:sdk-internal").SdkResourceField> = Record<string, import("diagonal:sdk-internal").SdkResourceField>, TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord, TRelations extends import("diagonal:sdk-internal").ResourceRelationCatalog = import("diagonal:sdk-internal").ResourceRelationCatalog, TWorkflowInputs extends import("diagonal:sdk-internal").SdkResourceWorkflowInputs = import("diagonal:sdk-internal").SdkResourceWorkflowInputs>', "arguments": "<TFields, TRecord, TRelations, TWorkflowInputs>" },
838
+ ResourceAnalytics: { "parameters": "", "arguments": "" },
839
+ ResourceBulkUpdateRecord: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
840
+ ResourceCapabilityFieldMappings: { "parameters": "", "arguments": "" },
841
+ ResourceCollectionResult: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
842
+ ResourceCountOptions: { "parameters": "", "arguments": "" },
843
+ ResourceDeletePayload: { "parameters": "", "arguments": "" },
844
+ ResourceField: { "parameters": "", "arguments": "" },
845
+ ResourceFieldSettings: { "parameters": "", "arguments": "" },
846
+ ResourceFieldSettingsUi: { "parameters": "", "arguments": "" },
847
+ ResourceFieldUpdatePayload: { "parameters": "", "arguments": "" },
848
+ ResourceForm: { "parameters": "", "arguments": "" },
849
+ ResourceFormWorkflowInputs: { "parameters": `<TResource extends Pick<import("diagonal:sdk-internal").SdkResource, 'workflow_inputs'>, TEvents extends import("diagonal:sdk-internal").SdkWorkflowEvent>`, "arguments": "<TResource, TEvents>" },
850
+ ResourceHandle: { "parameters": "", "arguments": "" },
851
+ ResourceListParams: { "parameters": "<TRelations extends readonly string[] = readonly string[]>", "arguments": "<TRelations>" },
852
+ ResourceOperation: { "parameters": "", "arguments": "" },
853
+ ResourceOperationRecord: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
854
+ ResourceOperations: { "parameters": '<TResource extends import("diagonal:sdk-internal").SdkResourceType = import("diagonal:sdk-internal").SdkResourceType>', "arguments": "<TResource>" },
855
+ ResourcePagination: { "parameters": "", "arguments": "" },
856
+ ResourceQueryHandle: { "parameters": `<TUrl extends keyof import("diagonal:sdk-internal").ResourceUrls = 'show' | 'search'>`, "arguments": "<TUrl>" },
857
+ ResourceQueryReference: { "parameters": `<TUrl extends keyof import("diagonal:sdk-internal").ResourceUrls = 'show' | 'search'>`, "arguments": "<TUrl>" },
858
+ ResourceRecord: { "parameters": "", "arguments": "" },
859
+ ResourceRecordCatalog: { "parameters": "", "arguments": "" },
860
+ ResourceRecordFormActionsProps: { "parameters": "", "arguments": "" },
861
+ ResourceRecordFormFieldsProps: { "parameters": "", "arguments": "" },
862
+ ResourceRecordFormStep: { "parameters": "<RenderState>", "arguments": "<RenderState>" },
863
+ ResourceRecordFrom: { "parameters": '<TResource extends import("diagonal:sdk-internal").SdkResourceType | null | undefined, TRelations extends readonly import("diagonal:sdk-internal").SdkResourceRelationPath<NonNullable<TResource>>[] = readonly []>', "arguments": "<TResource, TRelations>" },
864
+ ResourceRecordPayload: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
865
+ ResourceRecordResult: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
866
+ ResourceRecordsResult: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
867
+ ResourceReference: { "parameters": "", "arguments": "" },
868
+ ResourceRelationCatalog: { "parameters": "", "arguments": "" },
869
+ ResourceRelationPath: { "parameters": '<TResource extends import("diagonal:sdk-internal").SdkResourceType>', "arguments": "<TResource>" },
870
+ ResourceRelationsFrom: { "parameters": '<TResource extends import("diagonal:sdk-internal").SdkResourceType>', "arguments": "<TResource>" },
871
+ ResourceSearchAllOptions: { "parameters": "<TRelations extends readonly string[] = readonly string[]>", "arguments": "<TRelations>" },
872
+ ResourceSearchBody: { "parameters": "<TRelations extends readonly string[] = readonly string[]>", "arguments": "<TRelations>" },
873
+ ResourceSortDescriptor: { "parameters": "", "arguments": "" },
874
+ ResourceSortDescriptorList: { "parameters": "", "arguments": "" },
875
+ ResourceSortDirection: { "parameters": "", "arguments": "" },
876
+ ResourceSortFieldDescriptor: { "parameters": "", "arguments": "" },
877
+ ResourceSortInput: { "parameters": "", "arguments": "" },
878
+ ResourceSortMap: { "parameters": "", "arguments": "" },
879
+ ResourceType: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord, TRelations extends import("diagonal:sdk-internal").ResourceRelationCatalog = import("diagonal:sdk-internal").ResourceRelationCatalog>', "arguments": "<TRecord, TRelations>" },
880
+ ResourceUrls: { "parameters": "", "arguments": "" },
881
+ ResourceWorkflowInputs: { "parameters": "", "arguments": "" },
882
+ ResumeScheduledNotificationHandle: { "parameters": "", "arguments": "" },
883
+ Router: { "parameters": "", "arguments": "" },
884
+ RouterVisitOptions: { "parameters": "", "arguments": "" },
885
+ SaveNotificationTemplateHandle: { "parameters": "", "arguments": "" },
886
+ SaveNotificationTemplateInput: { "parameters": "", "arguments": "" },
887
+ SchedulableRecordRef: { "parameters": "", "arguments": "" },
888
+ ScheduleConflict: { "parameters": "", "arguments": "" },
889
+ ScheduleConflictsHandle: { "parameters": "", "arguments": "" },
890
+ ScheduleConflictsOptions: { "parameters": "", "arguments": "" },
891
+ ScheduleNotificationHandle: { "parameters": "", "arguments": "" },
892
+ ScheduleNotificationInput: { "parameters": "", "arguments": "" },
893
+ ScheduledNotificationContent: { "parameters": "", "arguments": "" },
894
+ ScheduledNotificationDetail: { "parameters": "", "arguments": "" },
895
+ ScheduledNotificationEdits: { "parameters": "", "arguments": "" },
896
+ ScheduledNotificationPreview: { "parameters": "", "arguments": "" },
897
+ ScheduledNotificationResult: { "parameters": "", "arguments": "" },
898
+ SelectedResourceRecord: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord, TRelationCatalog extends import("diagonal:sdk-internal").ResourceRelationCatalog, TRelations extends readonly Extract<keyof TRelationCatalog, string>[] = readonly []>', "arguments": "<TRecord, TRelationCatalog, TRelations>" },
899
+ SendBulkNotificationsHandle: { "parameters": "", "arguments": "" },
900
+ SendBulkNotificationsInput: { "parameters": "", "arguments": "" },
901
+ SendEmailHandle: { "parameters": "", "arguments": "" },
902
+ SendEmailInput: { "parameters": "", "arguments": "" },
903
+ SendEmailResponse: { "parameters": "", "arguments": "" },
904
+ SendNotificationHandle: { "parameters": "", "arguments": "" },
905
+ SendNotificationInput: { "parameters": "", "arguments": "" },
906
+ SendNotificationResponse: { "parameters": "", "arguments": "" },
907
+ SendResolvedNotificationHandle: { "parameters": "", "arguments": "" },
908
+ SendResolvedNotificationInput: { "parameters": "", "arguments": "" },
909
+ SendScheduledNotificationNowHandle: { "parameters": "", "arguments": "" },
910
+ SeriesChangeResult: { "parameters": "", "arguments": "" },
911
+ SeriesOccurrenceMeta: { "parameters": "", "arguments": "" },
912
+ SlotSearchGroup: { "parameters": "", "arguments": "" },
913
+ SmsMessage: { "parameters": "", "arguments": "" },
914
+ SmsMessageStatus: { "parameters": "", "arguments": "" },
915
+ SubscriptionChangePreview: { "parameters": "", "arguments": "" },
916
+ SubscriptionChangePreviewHandle: { "parameters": "", "arguments": "" },
917
+ SubscriptionChangePreviewOptions: { "parameters": "", "arguments": "" },
918
+ SubscriptionPreview: { "parameters": "", "arguments": "" },
919
+ SubscriptionPreviewHandle: { "parameters": "", "arguments": "" },
920
+ SubscriptionPreviewOptions: { "parameters": "", "arguments": "" },
921
+ SystemSettingsPage: { "parameters": "", "arguments": "" },
922
+ SystemSettingsPageEntry: { "parameters": "", "arguments": "" },
923
+ TextGenerateOptions: { "parameters": "", "arguments": "" },
924
+ TimeAddUnit: { "parameters": "", "arguments": "" },
925
+ TimeBoundaryUnit: { "parameters": "", "arguments": "" },
926
+ TiptapParseInput: { "parameters": "", "arguments": "" },
927
+ TwoFactorBackupCodesHandle: { "parameters": "", "arguments": "" },
928
+ TwoFactorBackupCodesState: { "parameters": "", "arguments": "" },
929
+ TwoFactorChallengeHandle: { "parameters": "", "arguments": "" },
930
+ TwoFactorChallengeState: { "parameters": "", "arguments": "" },
931
+ TwoFactorFlow: { "parameters": "", "arguments": "" },
932
+ TwoFactorMode: { "parameters": "", "arguments": "" },
933
+ TwoFactorPending: { "parameters": "", "arguments": "" },
934
+ TwoFactorRequestState: { "parameters": "", "arguments": "" },
935
+ TwoFactorSetupHandle: { "parameters": "", "arguments": "" },
936
+ TwoFactorSetupState: { "parameters": "", "arguments": "" },
937
+ TwoFactorSetupStep: { "parameters": "", "arguments": "" },
938
+ UpcomingNotification: { "parameters": "", "arguments": "" },
939
+ UpcomingNotifications: { "parameters": "", "arguments": "" },
940
+ UpcomingNotificationsOptions: { "parameters": "", "arguments": "" },
941
+ UpdateRecordHandle: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
942
+ UpdateScheduledNotificationHandle: { "parameters": "", "arguments": "" },
943
+ UpdateScheduledNotificationInput: { "parameters": "", "arguments": "" },
944
+ UseAnalyticsOptions: { "parameters": "", "arguments": "" },
945
+ UseApiOptions: { "parameters": "<TData = any>", "arguments": "<TData>" },
946
+ UseCalendarConnectionsOptions: { "parameters": "", "arguments": "" },
947
+ UseCreateRecordOptions: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
948
+ UseCreateResourceRecordFormResult: { "parameters": "", "arguments": "" },
949
+ UseForm: { "parameters": "", "arguments": "" },
950
+ UseInfiniteRecordsOptions: { "parameters": "<TRelations extends readonly string[] = readonly string[]>", "arguments": "<TRelations>" },
951
+ UseNotificationConsentOptions: { "parameters": "", "arguments": "" },
952
+ UsePollOptions: { "parameters": "", "arguments": "" },
953
+ UseRecordOptions: { "parameters": '<TRelations extends readonly string[] = readonly string[], TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRelations, TRecord>" },
954
+ UseRecordScheduleTimelinesOptions: { "parameters": "", "arguments": "" },
955
+ UseRecordsOptions: { "parameters": '<TRelations extends readonly string[] = readonly string[], TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRelations, TRecord>" },
956
+ UseSaveNotificationTemplateOptions: { "parameters": "", "arguments": "" },
957
+ UseSendEmailOptions: { "parameters": "", "arguments": "" },
958
+ UseSendNotificationOptions: { "parameters": "", "arguments": "" },
959
+ UseTwoFactorOptions: { "parameters": "", "arguments": "" },
960
+ UseUpdateRecordOptions: { "parameters": '<TRecord extends import("diagonal:sdk-internal").ResourceRecord = import("diagonal:sdk-internal").ResourceRecord>', "arguments": "<TRecord>" },
961
+ UseUpdateResourceRecordFormResult: { "parameters": "", "arguments": "" },
962
+ UseWorkflowActionResult: { "parameters": "", "arguments": "" },
963
+ UseWorkflowFormResult: { "parameters": "", "arguments": "" },
964
+ UseWorkspaceFieldsFormOptions: { "parameters": "", "arguments": "" },
965
+ UseWorkspaceFieldsFormResult: { "parameters": "", "arguments": "" },
966
+ Utils: { "parameters": "", "arguments": "" },
967
+ WorkflowEvent: { "parameters": "", "arguments": "" },
968
+ WorkflowForm: { "parameters": "", "arguments": "" },
969
+ WorkflowInput: { "parameters": "", "arguments": "" },
970
+ WorkflowInputProps: { "parameters": "", "arguments": "" },
971
+ WorkflowInputSettings: { "parameters": "", "arguments": "" },
972
+ WorkflowInputsProps: { "parameters": "", "arguments": "" },
973
+ WorkflowOutput: { "parameters": "", "arguments": "" },
974
+ WorkflowPendingResponse: { "parameters": "", "arguments": "" },
975
+ WorkflowReference: { "parameters": "", "arguments": "" },
976
+ WorkflowResponse: { "parameters": "", "arguments": "" },
977
+ WorkflowRouteSettings: { "parameters": "", "arguments": "" },
978
+ WorkflowTarget: { "parameters": "", "arguments": "" },
979
+ Workspace: { "parameters": "", "arguments": "" },
980
+ WorkspaceField: { "parameters": "", "arguments": "" },
981
+ WorkspaceFields: { "parameters": "", "arguments": "" },
982
+ WorkspaceFieldsForm: { "parameters": "", "arguments": "" },
983
+ WorkspaceRecord: { "parameters": "", "arguments": "" },
984
+ WorkspaceValues: { "parameters": "", "arguments": "" }
985
+ };
986
+
987
+ // app/pages/resources/js/pageRuntime/sdk/pageTypeCheckConfig.ts
988
+ var AMBIENT_SHIM = `
989
+ declare namespace React {
990
+ type ReactNode = RenderableChild;
991
+ type ReactElement = any;
992
+ type ComponentType<P = any> = (props: P) => any;
993
+ type FC<P = any> = (props: P & { children?: RenderableChild }) => any;
994
+ type PropsWithChildren<P = unknown> = P & { children?: RenderableChild };
995
+ type CSSProperties = { [property: string]: any };
996
+ type RefObject<T = any> = { current: T };
997
+ type MutableRefObject<T = any> = { current: T };
998
+ type Ref<T = any> = ((instance: T | null) => void) | RefObject<T | null> | null;
999
+ type Dispatch<A = any> = (value: A) => void;
1000
+ type SetStateAction<S = any> = S | ((previousState: S) => S);
1001
+ type DependencyList = readonly unknown[];
1002
+ type ChangeEvent<T = any> = any;
1003
+ type FormEvent<T = any> = any;
1004
+ type MouseEvent<T = any> = any;
1005
+ type KeyboardEvent<T = any> = any;
1006
+ type FocusEvent<T = any> = any;
1007
+ }
1008
+ interface DiagonalReactGlobal {
1009
+ useState(initialState: null): [any, React.Dispatch<React.SetStateAction<any>>];
1010
+ useState(initialState: never[]): [any[], React.Dispatch<React.SetStateAction<any[]>>];
1011
+ useState<S>(initialState: S | (() => S)): [S, React.Dispatch<React.SetStateAction<S>>];
1012
+ useState<S = undefined>(): [S | undefined, React.Dispatch<React.SetStateAction<S | undefined>>];
1013
+ useEffect(effect: () => any, deps?: React.DependencyList): void;
1014
+ useLayoutEffect(effect: () => any, deps?: React.DependencyList): void;
1015
+ useMemo<T>(factory: () => T, deps?: React.DependencyList): T;
1016
+ useCallback<T extends (...args: any[]) => any>(callback: T, deps?: React.DependencyList): T;
1017
+ useRef<T>(initialValue: T): React.RefObject<T>;
1018
+ useRef<T>(initialValue: T | null): React.RefObject<T | null>;
1019
+ useRef<T>(initialValue: T | undefined): React.RefObject<T | undefined>;
1020
+ useReducer<S, A>(reducer: (state: S, action: A) => S, initialState: S): [S, React.Dispatch<A>];
1021
+ useReducer<S, A, I>(
1022
+ reducer: (state: S, action: A) => S,
1023
+ initializerArg: I,
1024
+ initializer: (arg: I) => S
1025
+ ): [S, React.Dispatch<A>];
1026
+ useContext<T = any>(context: unknown): T;
1027
+ useId(): string;
1028
+ useTransition(): [boolean, (callback: () => void) => void];
1029
+ useDeferredValue<T>(value: T): T;
1030
+ memo<T>(component: T, arePropsEqual?: (previous: any, next: any) => boolean): T;
1031
+ forwardRef<T = any, P = any>(
1032
+ render: (props: P, ref: React.Ref<T>) => any
1033
+ ): (props: P & { ref?: React.Ref<T> }) => any;
1034
+ [member: string]: any;
1035
+ }
1036
+ declare const React: DiagonalReactGlobal;
1037
+ declare namespace JSX {
1038
+ type Element = any;
1039
+ interface ElementChildrenAttribute { children: {}; }
1040
+ interface IntrinsicAttributes { key?: any; }
1041
+ interface IntrinsicElements { [name: string]: { [attribute: string]: any; children?: RenderableChild }; }
1042
+ }
1043
+ type RenderableChild =
1044
+ | string
1045
+ | number
1046
+ | bigint
1047
+ | boolean
1048
+ | null
1049
+ | undefined
1050
+ | Iterable<RenderableChild>
1051
+ | Promise<RenderableChild>;
1052
+ `;
1053
+ var SDK_INTERNAL_MODULE = "diagonal:sdk-internal";
1054
+ var TYPE_CHECK_LIB = [
1055
+ "lib.es2023.d.ts",
1056
+ "lib.dom.d.ts",
1057
+ "lib.dom.iterable.d.ts"
1058
+ ];
1059
+ var TYPE_CHECK_FLAGS = {
1060
+ strict: false,
1061
+ strictNullChecks: true,
1062
+ noImplicitAny: true
1063
+ };
1064
+ var NON_IMPLICIT_ANY_CODES = /* @__PURE__ */ new Set([
1065
+ 7027,
1066
+ 7028,
1067
+ 7029,
1068
+ 7030,
1069
+ 7036,
1070
+ 7038,
1071
+ 7041,
1072
+ 7042,
1073
+ 7059,
1074
+ 7060,
1075
+ 7061
1076
+ ]);
1077
+ function isImplicitAnyDiagnostic(code2) {
1078
+ return code2 !== void 0 && code2 >= 7e3 && code2 <= 7099 && !NON_IMPLICIT_ANY_CODES.has(code2);
1079
+ }
1080
+
1081
+ // scripts/lib/runtime-build/module-imports.mjs
1082
+ import { existsSync, readdirSync, realpathSync, statSync } from "node:fs";
1083
+ import { builtinModules } from "node:module";
1084
+ import { basename, dirname, join, posix, relative } from "node:path";
1085
+ var APP_PREFIX = "@app/";
1086
+ var AUTHORING_MODULE = "@diagonal-hq/cli";
1087
+ var PAGES_SDK_MODULE = PAGES_SDK_PACKAGE;
1088
+ var RENAMED_MODULES = /* @__PURE__ */ new Map([["@diagonal/pages", PAGES_SDK_MODULE]]);
1089
+ function pagesSdkMember(name, { lint = false } = {}) {
1090
+ const path = PAGE_SDK_EXPORTS[name];
1091
+ if (lint && PAGE_SDK_FILE_TYPED_EXPORTS.includes(name)) {
1092
+ return `(Sdk as import(${JSON.stringify(SDK_INTERNAL_MODULE)}).FilePageSdk).${path.join(".")}`;
1093
+ }
1094
+ return ["Sdk", ...path].join(".");
1095
+ }
1096
+ function pagesSdkObjectText(names2 = null, { lint = false } = {}) {
1097
+ const exported = (names2 ?? Object.keys(PAGE_SDK_EXPORTS)).filter((name) => Object.hasOwn(PAGE_SDK_EXPORTS, name));
1098
+ return `{ ${exported.map((name) => `get ${name}() { return ${pagesSdkMember(name, { lint })}; }`).join(", ")} }`;
1099
+ }
1100
+ function isAuthoringModule(specifier) {
1101
+ return specifier === AUTHORING_MODULE;
1102
+ }
1103
+ var HOST_MODULES = /* @__PURE__ */ new Set([
1104
+ "react",
1105
+ "react/jsx-runtime",
1106
+ "react-dom",
1107
+ "react-dom/client",
1108
+ "@inertiajs/react",
1109
+ PAGES_SDK_MODULE,
1110
+ AUTHORING_MODULE
1111
+ ]);
1112
+ var SOURCE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx"];
1113
+ var BINARY_EXTENSIONS = /* @__PURE__ */ new Set([
1114
+ ".apng",
1115
+ ".avif",
1116
+ ".bmp",
1117
+ ".gif",
1118
+ ".heic",
1119
+ ".heif",
1120
+ ".ico",
1121
+ ".jpeg",
1122
+ ".jpg",
1123
+ ".jxl",
1124
+ ".png",
1125
+ ".svg",
1126
+ ".svgz",
1127
+ ".tif",
1128
+ ".tiff",
1129
+ ".webp",
1130
+ ".cur",
1131
+ ".m4v",
1132
+ ".mov",
1133
+ ".mp4",
1134
+ ".mpeg",
1135
+ ".mpg",
1136
+ ".ogv",
1137
+ ".webm",
1138
+ ".aac",
1139
+ ".flac",
1140
+ ".m4a",
1141
+ ".mp3",
1142
+ ".oga",
1143
+ ".ogg",
1144
+ ".opus",
1145
+ ".wav",
1146
+ ".weba",
1147
+ ".pdf",
1148
+ ".eot",
1149
+ ".otf",
1150
+ ".ttf",
1151
+ ".woff",
1152
+ ".woff2"
1153
+ ]);
1154
+ var BINARY_FILE_MESSAGE = "Binary files cannot be in the repository. Add it as an Application Asset and use Assets.<Name>.url from @app/generated/assets in code or url(asset:<key>) in CSS. For an icon, use the Icon component from @diagonal-hq/pages or an SVG written as a TSX component";
1155
+ var NODE_MODULES = new Set(builtinModules.flatMap((name) => [name, `node:${name}`]));
1156
+ var SERVER_PACKAGES = /* @__PURE__ */ new Set(["@diagonal/workflow", "@diagonal/workflow/workspace"]);
1157
+ var SERVER_PACKAGE_NAMES = /* @__PURE__ */ new Set(["@diagonal-hq/workflows"]);
1158
+ var IMPORT_RULES = {
1159
+ hostModules: [...HOST_MODULES],
1160
+ nodeModules: [...NODE_MODULES],
1161
+ renamedModules: Object.fromEntries(RENAMED_MODULES),
1162
+ serverModules: [...SERVER_PACKAGES],
1163
+ serverPackages: [...SERVER_PACKAGE_NAMES],
1164
+ binaryExtensions: [...BINARY_EXTENSIONS],
1165
+ sourceExtensions: SOURCE_EXTENSIONS,
1166
+ binaryFileMessage: BINARY_FILE_MESSAGE,
1167
+ pagesSdkModule: PAGES_SDK_MODULE,
1168
+ pagesSdkExports: Object.keys(PAGE_SDK_EXPORTS),
1169
+ pagesSdkTypes: Object.keys(PAGE_SDK_TYPES)
1170
+ };
1171
+ function importKind(specifier) {
1172
+ const bare = specifier.split("?")[0];
1173
+ if (specifier.includes("?") || bare.endsWith(".wasm") || /^[a-z][a-z0-9+.-]*:\/\//i.test(specifier)) {
1174
+ return "unsupported";
1175
+ }
1176
+ if (HOST_MODULES.has(specifier)) {
1177
+ return "host";
1178
+ }
1179
+ if (NODE_MODULES.has(specifier) || NODE_MODULES.has(specifier.split("/")[0])) {
1180
+ return "node";
1181
+ }
1182
+ if (RENAMED_MODULES.has(specifier)) {
1183
+ return "renamed";
1184
+ }
1185
+ if (SERVER_PACKAGES.has(specifier) || SERVER_PACKAGE_NAMES.has(packageName(specifier))) {
1186
+ return "server";
1187
+ }
1188
+ if (specifier.startsWith("@/") || specifier.startsWith("#")) {
1189
+ return "alias";
1190
+ }
1191
+ const local = specifier.startsWith(APP_PREFIX) || isRelativeSpecifier(specifier);
1192
+ if (!local) {
1193
+ return "package";
1194
+ }
1195
+ if (bare.endsWith(".module.css")) {
1196
+ return "style_module";
1197
+ }
1198
+ if (bare.endsWith(".css")) {
1199
+ return "style";
1200
+ }
1201
+ return BINARY_EXTENSIONS.has(posix.extname(bare).toLowerCase()) ? "binary" : "app";
1202
+ }
1203
+ function isRelativeSpecifier(specifier) {
1204
+ return specifier === "." || specifier === ".." || specifier.startsWith("./") || specifier.startsWith("../");
1205
+ }
1206
+ function unsupportedImportMessage(specifier, kind, suggestion = null) {
1207
+ switch (kind) {
1208
+ case "alias":
1209
+ return `"${specifier}" is not supported. Import a workspace file by its relative path, such as "${suggestion ?? "../components/Card"}", or from the workspace root with @app/`;
1210
+ case "binary":
1211
+ return `"${specifier}" is a binary file. ${BINARY_FILE_MESSAGE}`;
1212
+ case "node":
1213
+ return `"${specifier}" is a Node.js module. Pages run in the browser, so they cannot import it`;
1214
+ case "renamed":
1215
+ return `"${specifier}" is now "${RENAMED_MODULES.get(specifier)}". Import from "${RENAMED_MODULES.get(specifier)}"`;
1216
+ case "server":
1217
+ return `"${specifier}" runs in workflows only. A page cannot import it`;
1218
+ case "unsupported":
1219
+ return `"${specifier}" is not supported. Pages cannot import URLs, query suffixes such as ?worker or ?url, or WebAssembly`;
1220
+ default:
1221
+ return null;
1222
+ }
1223
+ }
1224
+ function packageName(specifier) {
1225
+ const parts = specifier.split("/");
1226
+ return specifier.startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
1227
+ }
1228
+ var TEST_SOURCE_PREFIX = "tests/";
1229
+ function testSourceImportMessage(from, target) {
1230
+ if (!target.startsWith(TEST_SOURCE_PREFIX) || from.startsWith(TEST_SOURCE_PREFIX)) {
1231
+ return null;
1232
+ }
1233
+ return `${from} imports ${target}. Only a file of tests/ can import a file of tests/. Move the shared code to another folder, such as lib/`;
1234
+ }
1235
+ function resolveLocalSpecifier(root, from, specifier) {
1236
+ return localCandidates(from, specifier).find((candidate) => isExactFile(join(root, candidate))) ?? null;
1237
+ }
1238
+ function resolveLocalSpecifierIn(paths, from, specifier) {
1239
+ return localCandidates(from, specifier).find((candidate) => paths.has(candidate)) ?? null;
1240
+ }
1241
+ function localCandidates(from, specifier) {
1242
+ const request = specifier.split("?")[0];
1243
+ const joined = request.startsWith(APP_PREFIX) ? request.slice(APP_PREFIX.length) : posix.join(posix.dirname(from), request);
1244
+ const path = posix.normalize(joined).replace(/\/+$/, "");
1245
+ if (path === "" || path === "." || path.startsWith("../") || path === ".." || path.startsWith("/")) {
1246
+ return [];
1247
+ }
1248
+ return [
1249
+ path,
1250
+ ...SOURCE_EXTENSIONS.map((extension) => `${path}${extension}`),
1251
+ ...SOURCE_EXTENSIONS.map((extension) => `${path}/index${extension}`)
1252
+ ];
1253
+ }
1254
+ function relativeSpecifier(from, path) {
1255
+ const extension = SOURCE_EXTENSIONS.find((candidate) => path.endsWith(candidate));
1256
+ const target = extension === void 0 ? path : path.slice(0, -extension.length);
1257
+ const relativePath = posix.relative(posix.dirname(from), target);
1258
+ return relativePath.startsWith("../") ? relativePath : `./${relativePath}`;
1259
+ }
1260
+ function suggestedRelativeSpecifier(root, from, specifier) {
1261
+ const tail = specifier.split("?")[0].replace(/^@\//, "").replace(/^#[^/]*\//, "").replace(new RegExp(`^${APP_PREFIX}`), "").replace(/^(\.\.?\/)+/, "");
1262
+ if (tail === "" || tail.startsWith("#")) {
1263
+ return null;
1264
+ }
1265
+ const path = resolveLocalSpecifier(root, "", tail);
1266
+ return path === null ? null : relativeSpecifier(from, path);
1267
+ }
1268
+ function isExactFile(path) {
1269
+ return existsSync(path) && statSync(path).isFile() && readdirSync(dirname(path)).includes(basename(path));
1270
+ }
1271
+ function moduleSpecifiers(ast) {
1272
+ const found2 = [];
1273
+ for (const statement2 of ast.program.body) {
1274
+ const isImport2 = statement2.type === "ImportDeclaration";
1275
+ const isReExport = (statement2.type === "ExportAllDeclaration" || statement2.type === "ExportNamedDeclaration") && statement2.source !== null && statement2.source !== void 0;
1276
+ if (isImport2 || isReExport) {
1277
+ const typeOnly = statement2.importKind === "type" || statement2.exportKind === "type";
1278
+ found2.push({ specifier: statement2.source.value, node: statement2.source, statement: statement2, dynamic: false, typeOnly });
1279
+ }
1280
+ }
1281
+ const pending = [ast.program];
1282
+ while (pending.length > 0) {
1283
+ const node = pending.pop();
1284
+ if (node === null || typeof node !== "object") {
1285
+ continue;
1286
+ }
1287
+ const isDynamicImport = node.type === "ImportExpression" || node.type === "CallExpression" && node.callee.type === "Import";
1288
+ if (isDynamicImport) {
1289
+ const argument = node.type === "ImportExpression" ? node.source : node.arguments[0];
1290
+ const literal = argument?.type === "StringLiteral" ? argument.value : null;
1291
+ found2.push({ specifier: literal, node: argument ?? node, call: node, statement: null, dynamic: true, typeOnly: false });
1292
+ }
1293
+ for (const [key, value] of Object.entries(node)) {
1294
+ if (key === "loc" || key === "start" || key === "end" || key === "extra") {
1295
+ continue;
1296
+ }
1297
+ if (Array.isArray(value)) {
1298
+ pending.push(...value);
1299
+ } else if (value !== null && typeof value === "object" && typeof value.type === "string") {
1300
+ pending.push(value);
1301
+ }
1302
+ }
1303
+ }
1304
+ return found2;
1305
+ }
1306
+ function requestedNames(statement2) {
1307
+ if (statement2 === null || statement2.importKind === "type" || statement2.exportKind === "type") {
1308
+ return [];
1309
+ }
1310
+ if (statement2.type === "ExportAllDeclaration") {
1311
+ return ["*"];
1312
+ }
1313
+ if (statement2.type === "ExportNamedDeclaration") {
1314
+ return (statement2.specifiers ?? []).filter((specifier) => specifier.exportKind !== "type").map(
1315
+ (specifier) => specifier.type === "ExportNamespaceSpecifier" ? "*" : specifier.local.name ?? specifier.local.value
1316
+ );
1317
+ }
1318
+ if (statement2.type !== "ImportDeclaration") {
1319
+ return [];
1320
+ }
1321
+ return statement2.specifiers.flatMap((specifier) => {
1322
+ if (specifier.type === "ImportDefaultSpecifier") {
1323
+ return ["default"];
1324
+ }
1325
+ if (specifier.type === "ImportNamespaceSpecifier") {
1326
+ return ["*"];
1327
+ }
1328
+ if (specifier.type === "ImportSpecifier" && specifier.importKind !== "type") {
1329
+ return [specifier.imported.name ?? specifier.imported.value];
1330
+ }
1331
+ return [];
1332
+ });
1333
+ }
1334
+
293
1335
  // node_modules/@babel/parser/lib/index.js
294
1336
  var Position = class {
295
1337
  constructor(line, col, index3) {
@@ -635,7 +1677,7 @@ function toParseErrorConstructor({
635
1677
  if (hasMissingPlugin) {
636
1678
  error.missingPlugin = details.missingPlugin;
637
1679
  }
638
- defineHidden(error, "clone", function clone2(overrides = {}) {
1680
+ defineHidden(error, "clone", function clone3(overrides = {}) {
639
1681
  const {
640
1682
  line,
641
1683
  column,
@@ -949,24 +1991,24 @@ var estree = (superClass) => class ESTreeParserMixin extends superClass {
949
1991
  return super.nameIsConstructor(key);
950
1992
  }
951
1993
  parseClassProperty(...args) {
952
- const propertyNode = super.parseClassProperty(...args);
953
- if (propertyNode.abstract && this.hasPlugin("typescript")) {
954
- delete propertyNode.abstract;
955
- this.castNodeTo(propertyNode, "TSAbstractPropertyDefinition");
1994
+ const propertyNode2 = super.parseClassProperty(...args);
1995
+ if (propertyNode2.abstract && this.hasPlugin("typescript")) {
1996
+ delete propertyNode2.abstract;
1997
+ this.castNodeTo(propertyNode2, "TSAbstractPropertyDefinition");
956
1998
  } else {
957
- this.castNodeTo(propertyNode, "PropertyDefinition");
1999
+ this.castNodeTo(propertyNode2, "PropertyDefinition");
958
2000
  }
959
- return propertyNode;
2001
+ return propertyNode2;
960
2002
  }
961
2003
  parseClassPrivateProperty(...args) {
962
- const propertyNode = super.parseClassPrivateProperty(...args);
963
- if (propertyNode.abstract && this.hasPlugin("typescript")) {
964
- this.castNodeTo(propertyNode, "TSAbstractPropertyDefinition");
2004
+ const propertyNode2 = super.parseClassPrivateProperty(...args);
2005
+ if (propertyNode2.abstract && this.hasPlugin("typescript")) {
2006
+ this.castNodeTo(propertyNode2, "TSAbstractPropertyDefinition");
965
2007
  } else {
966
- this.castNodeTo(propertyNode, "PropertyDefinition");
2008
+ this.castNodeTo(propertyNode2, "PropertyDefinition");
967
2009
  }
968
- propertyNode.computed = false;
969
- return propertyNode;
2010
+ propertyNode2.computed = false;
2011
+ return propertyNode2;
970
2012
  }
971
2013
  parseClassAccessorProperty(node) {
972
2014
  const accessorPropertyNode = super.parseClassAccessorProperty(node);
@@ -12268,14 +13310,14 @@ var typescript = (superClass) => class TypeScriptParserMixin extends superClass
12268
13310
  const node = this.startNode();
12269
13311
  node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
12270
13312
  let seenOptionalElement = false;
12271
- node.elementTypes.forEach((elementNode) => {
13313
+ node.elementTypes.forEach((elementNode2) => {
12272
13314
  const {
12273
13315
  type
12274
- } = elementNode;
12275
- if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
12276
- this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode);
13316
+ } = elementNode2;
13317
+ if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode2.optional)) {
13318
+ this.raise(TSErrors.OptionalTypeBeforeRequired, elementNode2);
12277
13319
  }
12278
- seenOptionalElement ||= type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
13320
+ seenOptionalElement ||= type === "TSNamedTupleMember" && elementNode2.optional || type === "TSOptionalType";
12279
13321
  });
12280
13322
  return this.finishNode(node, "TSTupleType");
12281
13323
  }
@@ -15272,6 +16314,12 @@ function expectDefineCall(declaration, name, argumentCount) {
15272
16314
  }
15273
16315
  return declaration.arguments;
15274
16316
  }
16317
+ function isFunctionNode(node) {
16318
+ return node?.type === "FunctionDeclaration" || node?.type === "FunctionExpression" || node?.type === "ArrowFunctionExpression";
16319
+ }
16320
+ function sliceOf(source, node) {
16321
+ return source.slice(node.start, node.end);
16322
+ }
15275
16323
  function childNodes(node) {
15276
16324
  const children = [];
15277
16325
  for (const [key, child] of Object.entries(node)) {
@@ -15290,6 +16338,63 @@ function childNodes(node) {
15290
16338
  }
15291
16339
  return children;
15292
16340
  }
16341
+ function freeName(preferred, ast) {
16342
+ const used = /* @__PURE__ */ new Set();
16343
+ const pending = [ast.program];
16344
+ while (pending.length > 0) {
16345
+ const node = pending.pop();
16346
+ if (node.type === "Identifier" || node.type === "JSXIdentifier") {
16347
+ used.add(node.name);
16348
+ }
16349
+ pending.push(...childNodes(node));
16350
+ }
16351
+ let name = preferred;
16352
+ for (let suffix = 2; used.has(name); suffix += 1) {
16353
+ name = `${preferred}${suffix}`;
16354
+ }
16355
+ return name;
16356
+ }
16357
+ function patternNames(pattern) {
16358
+ switch (pattern?.type) {
16359
+ case "Identifier":
16360
+ return [pattern.name];
16361
+ case "ObjectPattern":
16362
+ return pattern.properties.flatMap(
16363
+ (property) => patternNames(property.type === "RestElement" ? property.argument : property.value)
16364
+ );
16365
+ case "ArrayPattern":
16366
+ return pattern.elements.flatMap((element) => patternNames(element));
16367
+ case "AssignmentPattern":
16368
+ return patternNames(pattern.left);
16369
+ case "RestElement":
16370
+ return patternNames(pattern.argument);
16371
+ default:
16372
+ return [];
16373
+ }
16374
+ }
16375
+ function topLevelNames(ast) {
16376
+ const names2 = /* @__PURE__ */ new Set();
16377
+ for (const statement2 of ast.program.body) {
16378
+ const declaration = statement2.type === "ExportNamedDeclaration" ? statement2.declaration : statement2;
16379
+ if (declaration?.type === "VariableDeclaration") {
16380
+ for (const declarator of declaration.declarations) {
16381
+ for (const name of patternNames(declarator.id)) {
16382
+ names2.add(name);
16383
+ }
16384
+ }
16385
+ } else if (declaration?.id?.type === "Identifier") {
16386
+ names2.add(declaration.id.name);
16387
+ }
16388
+ }
16389
+ return names2;
16390
+ }
16391
+ function bindsName(ast, name) {
16392
+ const imported = ast.program.body.filter((statement2) => statement2.type === "ImportDeclaration").some((statement2) => statement2.specifiers.some((specifier) => specifier.local.name === name));
16393
+ return imported || topLevelNames(ast).has(name);
16394
+ }
16395
+ function usesImplicitName(ast, source, name) {
16396
+ return !bindsName(ast, name) && new RegExp(`\\b${name}\\b`).test(source);
16397
+ }
15293
16398
 
15294
16399
  // node_modules/obug/dist/core.js
15295
16400
  function coerce(value) {
@@ -28432,6 +29537,10 @@ var TraceMap = class {
28432
29537
  function cast(map) {
28433
29538
  return map;
28434
29539
  }
29540
+ function encodedMappings(map) {
29541
+ var _a, _b;
29542
+ return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded);
29543
+ }
28435
29544
  function decodedMappings(map) {
28436
29545
  var _a;
28437
29546
  return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));
@@ -28462,6 +29571,29 @@ function originalPositionFor(map, needle) {
28462
29571
  segment.length === 5 ? names2[segment[NAMES_INDEX]] : null
28463
29572
  );
28464
29573
  }
29574
+ function presortedDecodedMap(map, mapUrl) {
29575
+ const tracer = new TraceMap(clone2(map, []), mapUrl);
29576
+ cast(tracer)._decoded = map.mappings;
29577
+ return tracer;
29578
+ }
29579
+ function decodedMap(map) {
29580
+ return clone2(map, decodedMappings(map));
29581
+ }
29582
+ function encodedMap(map) {
29583
+ return clone2(map, encodedMappings(map));
29584
+ }
29585
+ function clone2(map, mappings) {
29586
+ return {
29587
+ version: map.version,
29588
+ file: map.file,
29589
+ names: map.names,
29590
+ sourceRoot: map.sourceRoot,
29591
+ sources: map.sources,
29592
+ sourcesContent: map.sourcesContent,
29593
+ mappings,
29594
+ ignoreList: map.ignoreList || map.x_google_ignoreList
29595
+ };
29596
+ }
28465
29597
  function OMapping(source, line, column, name) {
28466
29598
  return { source, line, column, name };
28467
29599
  }
@@ -39815,17 +40947,208 @@ traverse3.hasType = function(tree, type, denylistTypes) {
39815
40947
  };
39816
40948
  traverse3.cache = cache;
39817
40949
 
40950
+ // app/pages/resources/js/pageRuntime/sdk/generatedNames.ts
40951
+ function studlyName(text) {
40952
+ return text.split(/[^A-Za-z0-9]+/).filter((word) => word !== "").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
40953
+ }
40954
+ function pageName(path) {
40955
+ const name = path.replace(/^pages\//, "").replace(/\.tsx$/, "").split("/").map((segment) => {
40956
+ const parameter = /^\[(.+)\]$/.exec(segment);
40957
+ return parameter === null ? studlyName(segment) : `$${studlyName(parameter[1])}`;
40958
+ }).join("_");
40959
+ return /^[0-9]/.test(name) ? `Page${name}` : name;
40960
+ }
40961
+
40962
+ // scripts/lib/runtime-build/resource-paths.mjs
40963
+ var CHILD_KINDS = Object.freeze({
40964
+ fields: "resource_field",
40965
+ policies: "resource_policy",
40966
+ records: "resource_record"
40967
+ });
40968
+ var DEFINITION_PATH = /^resources\/([^/]+)\/resource\.ts$/;
40969
+ var CHILD_PATH = /^resources\/([^/]+)\/(fields|policies|records)\/([^/]+)\.ts$/;
40970
+ function isResourcePath(path) {
40971
+ return DEFINITION_PATH.test(withoutDevInfix(path));
40972
+ }
40973
+ function resourceChildOf(path) {
40974
+ const match = CHILD_PATH.exec(withoutDevInfix(path));
40975
+ if (match === null) {
40976
+ return null;
40977
+ }
40978
+ const [, folder, directory, key] = match;
40979
+ return { folder, kind: CHILD_KINDS[directory], key, definitionPath: `resources/${folder}/resource.ts` };
40980
+ }
40981
+ function resourceFolderOf(path) {
40982
+ return DEFINITION_PATH.exec(withoutDevInfix(path))?.[1] ?? null;
40983
+ }
40984
+
39818
40985
  // scripts/lib/runtime-build/resource-references.mjs
39819
40986
  var traverse4 = traverse3.default ?? traverse3;
39820
40987
  var GENERATED_RESOURCES_PATH = "generated/resources.ts";
40988
+ var GENERATED_RESOURCES_MODULE = "@app/generated/resources";
40989
+ var RESOURCES_EXPORT = "Resources";
40990
+ var RESOURCE_SLUG_PATTERN = /^[a-z][a-z0-9_-]*$/;
40991
+ function resourceMemberName(resource) {
40992
+ return studlyName(resource.folder ?? resource.slug);
40993
+ }
40994
+ function pathName(path, text, { exportName, label, part = "file", showText = true, severity = "error" }, diagnostics) {
40995
+ const name = studlyName(text);
40996
+ if (IDENTIFIER_KEY.test(name)) {
40997
+ return name;
40998
+ }
40999
+ const subject = showText ? `The ${part} name "${text}"` : `The ${part} name`;
41000
+ diagnostics.push(
41001
+ diagnosticAt(
41002
+ path,
41003
+ null,
41004
+ `${subject} gives the ${label} no ${exportName} name, because "${name}" is not an identifier. Start the ${part} name with a letter`,
41005
+ { severity }
41006
+ )
41007
+ );
41008
+ return null;
41009
+ }
39821
41010
  var BUILT_IN_RESOURCES = Object.freeze([
39822
41011
  Object.freeze({ slug: "permissions", builtIn: true }),
39823
41012
  Object.freeze({ slug: "roles", builtIn: true })
39824
41013
  ]);
39825
41014
  var BUILT_IN_RESOURCE_SLUGS = new Set(BUILT_IN_RESOURCES.map((resource) => resource.slug));
41015
+ var SLUG_RULE = "start with a lowercase letter and contain only a-z, 0-9, _ and -";
41016
+ function resourceNames(files, diagnostics) {
41017
+ const slugsByName = /* @__PURE__ */ new Map();
41018
+ const namesBySlug = /* @__PURE__ */ new Map();
41019
+ const slugsByPath = /* @__PURE__ */ new Map();
41020
+ const pathsByName = /* @__PURE__ */ new Map();
41021
+ const pathsBySlug = /* @__PURE__ */ new Map();
41022
+ for (const { slug } of BUILT_IN_RESOURCES) {
41023
+ slugsByName.set(studlyName(slug), slug);
41024
+ namesBySlug.set(slug, studlyName(slug));
41025
+ }
41026
+ for (const { path, slug: declared = null, node = null, problem = null } of files) {
41027
+ const fileName = resourceFolderOf(withoutDevInfix(path));
41028
+ if (fileName === null) {
41029
+ throw new Error(`resourceNames() takes the resources/<folder>/resource.ts path of each resource, not ${path}`);
41030
+ }
41031
+ if (BUILT_IN_RESOURCE_SLUGS.has(fileName)) {
41032
+ diagnostics.push(
41033
+ diagnosticAt(
41034
+ path,
41035
+ null,
41036
+ "Delete this folder. The build always generates Resources.Roles and Resources.Permissions."
41037
+ )
41038
+ );
41039
+ continue;
41040
+ }
41041
+ if (!RESOURCE_SLUG_PATTERN.test(fileName)) {
41042
+ const role = declared === null ? "is the resource slug" : "gives the Resources name of the resource";
41043
+ diagnostics.push(diagnosticAt(path, null, `The folder name "${fileName}" ${role}, so it must ${SLUG_RULE}`));
41044
+ continue;
41045
+ }
41046
+ if (problem !== null) {
41047
+ diagnostics.push(diagnosticAt(path, node, problem));
41048
+ continue;
41049
+ }
41050
+ if (declared !== null && !RESOURCE_SLUG_PATTERN.test(declared)) {
41051
+ diagnostics.push(
41052
+ diagnosticAt(path, node, `The "slug" of the resource is "${declared}". A resource slug must ${SLUG_RULE}`)
41053
+ );
41054
+ continue;
41055
+ }
41056
+ if (declared !== null && BUILT_IN_RESOURCE_SLUGS.has(declared)) {
41057
+ diagnostics.push(
41058
+ diagnosticAt(
41059
+ path,
41060
+ node,
41061
+ `"${declared}" is the slug of the built-in resource Resources.${studlyName(declared)}. Give this resource another slug`
41062
+ )
41063
+ );
41064
+ continue;
41065
+ }
41066
+ const slug = declared ?? fileName;
41067
+ const name = studlyName(fileName);
41068
+ const otherName = pathsByName.get(name);
41069
+ if (otherName === void 0 && slugsByName.has(name)) {
41070
+ diagnostics.push(
41071
+ diagnosticAt(path, null, `The folder name "${fileName}" has the name Resources.${name} of a built-in resource. Rename the folder`)
41072
+ );
41073
+ continue;
41074
+ }
41075
+ if (otherName !== void 0) {
41076
+ diagnostics.push(
41077
+ diagnosticAt(
41078
+ path,
41079
+ null,
41080
+ `The folder names "${resourceFolderOf(otherName)}" and "${fileName}" both have the name Resources.${name}. Rename one of the folders`,
41081
+ { relatedPath: otherName }
41082
+ )
41083
+ );
41084
+ continue;
41085
+ }
41086
+ const otherSlug = pathsBySlug.get(slug);
41087
+ if (otherSlug !== void 0) {
41088
+ diagnostics.push(
41089
+ diagnosticAt(
41090
+ path,
41091
+ node,
41092
+ `The resources ${otherSlug} and ${path} have the same slug "${slug}". Change the slug of one of them`,
41093
+ { relatedPath: otherSlug }
41094
+ )
41095
+ );
41096
+ continue;
41097
+ }
41098
+ slugsByName.set(name, slug);
41099
+ namesBySlug.set(slug, name);
41100
+ slugsByPath.set(path, slug);
41101
+ pathsByName.set(name, path);
41102
+ pathsBySlug.set(slug, path);
41103
+ }
41104
+ return { slugsByName, namesBySlug, slugsByPath };
41105
+ }
41106
+ function branchResourceNames(resources) {
41107
+ return resourceNames(
41108
+ resources.map((resource) => typeof resource === "string" ? { path: resource } : resource),
41109
+ []
41110
+ );
41111
+ }
39826
41112
  function unknownNameMessage(values, path, key, depth) {
39827
41113
  return values.unknownName?.(path, key, depth) ?? (depth === 0 ? `Unknown ${values.noun} "${path}.${key}". Each name in ${path} is a file in ${values.directory}` : `${path} has no "${key}"`);
39828
41114
  }
41115
+ function byteOrder(left, right) {
41116
+ return left < right ? -1 : left > right ? 1 : 0;
41117
+ }
41118
+ var IDENTIFIER_KEY = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
41119
+ function printedKey(key) {
41120
+ if (key === "__proto__") {
41121
+ return `[${quoted(key)}]`;
41122
+ }
41123
+ return IDENTIFIER_KEY.test(key) ? key : quoted(key);
41124
+ }
41125
+ function quoted(text) {
41126
+ const escaped = text.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/\r/g, "\\r");
41127
+ const singles = (text.match(/'/g) ?? []).length;
41128
+ const doubles = (text.match(/"/g) ?? []).length;
41129
+ return singles > doubles ? `"${escaped.replace(/"/g, '\\"')}"` : `'${escaped.replace(/'/g, "\\'")}'`;
41130
+ }
41131
+ function generatedBindingLocal(ast, specifier, exportName) {
41132
+ for (const statement2 of ast.program.body) {
41133
+ if (statement2.type !== "ImportDeclaration" || statement2.source.value !== specifier || statement2.importKind === "type") {
41134
+ continue;
41135
+ }
41136
+ for (const item of statement2.specifiers) {
41137
+ if (item.type === "ImportSpecifier" && item.importKind !== "type" && (item.imported.name ?? item.imported.value) === exportName) {
41138
+ return item.local.name;
41139
+ }
41140
+ }
41141
+ }
41142
+ return null;
41143
+ }
41144
+ function resourcesImport(local) {
41145
+ const specifier = local === RESOURCES_EXPORT ? local : `${RESOURCES_EXPORT} as ${local}`;
41146
+ return `import { ${specifier} } from '${GENERATED_RESOURCES_MODULE}';`;
41147
+ }
41148
+ function resourcesBinding(ast, names2) {
41149
+ const local = generatedBindingLocal(ast, GENERATED_RESOURCES_MODULE, RESOURCES_EXPORT);
41150
+ return local === null ? null : { local, slugsByName: names2.slugsByName };
41151
+ }
39829
41152
 
39830
41153
  // scripts/lib/runtime-build/static-value.mjs
39831
41154
  var FieldBuilderValue = class {
@@ -39933,7 +41256,7 @@ function generatedReference(node, options) {
39933
41256
  }
39934
41257
  throw new SourceError("MemberExpression is not allowed in static data. Use literal values only", node);
39935
41258
  }
39936
- function generatedValue(node, { nameNode, propertyNode }, local, valuesByName, kind) {
41259
+ function generatedValue(node, { nameNode, propertyNode: propertyNode2 }, local, valuesByName, kind) {
39937
41260
  const name = `${local}.${nameNode.name}`;
39938
41261
  if (valuesByName !== null && !valuesByName.has(nameNode.name)) {
39939
41262
  throw new SourceError(
@@ -39941,28 +41264,28 @@ function generatedValue(node, { nameNode, propertyNode }, local, valuesByName, k
39941
41264
  nameNode
39942
41265
  );
39943
41266
  }
39944
- if (propertyNode === null) {
41267
+ if (propertyNode2 === null) {
39945
41268
  throw new SourceError(
39946
41269
  `${name} is the metadata of the ${kind.noun}. Use ${name}.${kind.property} to name the ${kind.noun}`,
39947
41270
  node
39948
41271
  );
39949
41272
  }
39950
- if (propertyNode.name !== kind.property) {
41273
+ if (propertyNode2.name !== kind.property) {
39951
41274
  throw new SourceError(
39952
- `Static data cannot read ${name}.${propertyNode.name}. Use ${name}.${kind.property} to name the ${kind.noun}`,
39953
- propertyNode
41275
+ `Static data cannot read ${name}.${propertyNode2.name}. Use ${name}.${kind.property} to name the ${kind.noun}`,
41276
+ propertyNode2
39954
41277
  );
39955
41278
  }
39956
41279
  return valuesByName === null ? kind.nameValue(nameNode.name) : valuesByName.get(nameNode.name);
39957
41280
  }
39958
41281
  function pageReference(node, binding) {
39959
- const { nameNode, propertyNode } = generatedMember(node, binding.local);
41282
+ const { nameNode, propertyNode: propertyNode2 } = generatedMember(node, binding.local);
39960
41283
  const name = `${binding.local}.${nameNode.name}`;
39961
41284
  if (!Object.hasOwn(binding.entries, nameNode.name)) {
39962
41285
  throw new SourceError(`Unknown page "${name}". Each name in ${binding.local} is a file in pages/`, nameNode);
39963
41286
  }
39964
- if (propertyNode === null || propertyNode.name !== "uid") {
39965
- throw new SourceError(`Static data cannot read ${propertyNode === null ? name : `${name}.${propertyNode.name}`}. Use ${name}.uid to name the page`, propertyNode ?? node);
41287
+ if (propertyNode2 === null || propertyNode2.name !== "uid") {
41288
+ throw new SourceError(`Static data cannot read ${propertyNode2 === null ? name : `${name}.${propertyNode2.name}`}. Use ${name}.uid to name the page`, propertyNode2 ?? node);
39966
41289
  }
39967
41290
  const { uid: uid2 } = binding.entries[nameNode.name];
39968
41291
  if (uid2 === null) {
@@ -39971,16 +41294,16 @@ function pageReference(node, binding) {
39971
41294
  return uid2;
39972
41295
  }
39973
41296
  function workflowReference(node, binding) {
39974
- const { nameNode, propertyNode } = generatedMember(node, binding.local);
41297
+ const { nameNode, propertyNode: propertyNode2 } = generatedMember(node, binding.local);
39975
41298
  const name = `${binding.local}.${nameNode.name}`;
39976
41299
  if (!Object.hasOwn(binding.entries, nameNode.name)) {
39977
41300
  throw new SourceError(`Unknown workflow "${name}". Each name in ${binding.local} is a file in workflows/`, nameNode);
39978
41301
  }
39979
41302
  const { uid: uid2 } = binding.entries[nameNode.name];
39980
- if (propertyNode === null || propertyNode.name !== "uid") {
41303
+ if (propertyNode2 === null || propertyNode2.name !== "uid") {
39981
41304
  throw new SourceError(
39982
- `Static data cannot read ${propertyNode === null ? name : `${name}.${propertyNode.name}`}. Use ${name}.uid to name the workflow`,
39983
- propertyNode ?? node
41305
+ `Static data cannot read ${propertyNode2 === null ? name : `${name}.${propertyNode2.name}`}. Use ${name}.uid to name the workflow`,
41306
+ propertyNode2 ?? node
39984
41307
  );
39985
41308
  }
39986
41309
  if (uid2 === null) {
@@ -39989,15 +41312,15 @@ function workflowReference(node, binding) {
39989
41312
  return uid2;
39990
41313
  }
39991
41314
  function permissionReference(node, binding) {
39992
- const { nameNode, propertyNode } = generatedMember(node, binding.local);
41315
+ const { nameNode, propertyNode: propertyNode2 } = generatedMember(node, binding.local);
39993
41316
  const name = `${binding.local}.${nameNode.name}`;
39994
41317
  if (!Object.hasOwn(binding.entries, nameNode.name)) {
39995
41318
  throw new SourceError(`Unknown permission "${name}". Each name in ${binding.local} is a permission of ${binding.source}`, nameNode);
39996
41319
  }
39997
- if (propertyNode === null || propertyNode.name !== "uid") {
41320
+ if (propertyNode2 === null || propertyNode2.name !== "uid") {
39998
41321
  throw new SourceError(
39999
- `Static data cannot read ${propertyNode === null ? name : `${name}.${propertyNode.name}`}. Use ${name}.uid to name the permission`,
40000
- propertyNode ?? node
41322
+ `Static data cannot read ${propertyNode2 === null ? name : `${name}.${propertyNode2.name}`}. Use ${name}.uid to name the permission`,
41323
+ propertyNode2 ?? node
40001
41324
  );
40002
41325
  }
40003
41326
  const { uid: uid2 } = binding.entries[nameNode.name];
@@ -40167,19 +41490,152 @@ function staticObject(node, options = {}) {
40167
41490
  }
40168
41491
  return { value, nodes };
40169
41492
  }
41493
+ function propertyNode(objectNode, key) {
41494
+ const node = objectNode?.value ?? objectNode;
41495
+ if (node?.type !== "ObjectExpression") {
41496
+ return objectNode;
41497
+ }
41498
+ return node.properties.find((property) => (property.key.name ?? property.key.value) === key) ?? objectNode;
41499
+ }
41500
+ function elementNode(listNode, position) {
41501
+ const node = listNode?.value ?? listNode;
41502
+ return node?.type === "ArrayExpression" ? node.elements[position] ?? listNode : listNode;
41503
+ }
41504
+ function isJson(value) {
41505
+ if (value === null || ["string", "boolean"].includes(typeof value)) {
41506
+ return true;
41507
+ }
41508
+ if (typeof value === "number") {
41509
+ return Number.isFinite(value);
41510
+ }
41511
+ if (Array.isArray(value)) {
41512
+ return value.every(isJson);
41513
+ }
41514
+ return isPlainObject2(value) && Object.values(value).every(isJson);
41515
+ }
41516
+ function isPlainObject2(value) {
41517
+ return value !== null && typeof value === "object" && !Array.isArray(value);
41518
+ }
41519
+ function requireString(value, key, node, { optional = false } = {}) {
41520
+ const item = value[key];
41521
+ if (item === void 0 || item === null) {
41522
+ if (optional) {
41523
+ return null;
41524
+ }
41525
+ throw new SourceError(`"${key}" is required`, node);
41526
+ }
41527
+ if (typeof item !== "string" || item === "") {
41528
+ throw new SourceError(`"${key}" must be a non-empty string`, node);
41529
+ }
41530
+ return item;
41531
+ }
41532
+ function editableProperties(node, label) {
41533
+ if (node.type !== "ObjectExpression") {
41534
+ throw new SourceError(`${label} must be an object literal to edit it in the app.`, node);
41535
+ }
41536
+ const result = /* @__PURE__ */ new Map();
41537
+ for (const property of node.properties) {
41538
+ if (property.type !== "ObjectProperty" || property.computed || property.shorthand) {
41539
+ throw new SourceError(
41540
+ `${label} uses a spread, a method, or a computed or shorthand property. Edit the file in Files.`,
41541
+ property
41542
+ );
41543
+ }
41544
+ const key = propertyKey(property);
41545
+ if (result.has(key)) {
41546
+ throw new SourceError(`Duplicate property "${key}".`, property);
41547
+ }
41548
+ result.set(key, property);
41549
+ }
41550
+ return result;
41551
+ }
40170
41552
 
40171
41553
  export {
41554
+ package_rules_default,
41555
+ declaredSlug,
41556
+ isDevPath,
41557
+ withoutDevInfix,
41558
+ diagnostic,
41559
+ diagnosticAt,
41560
+ hasErrors,
41561
+ sortDiagnostics,
41562
+ TraceMap,
41563
+ presortedDecodedMap,
41564
+ decodedMap,
41565
+ encodedMap,
41566
+ traverse3 as traverse,
41567
+ studlyName,
41568
+ pageName,
41569
+ isResourcePath,
41570
+ resourceChildOf,
41571
+ resourceFolderOf,
41572
+ PAGES_SDK_PACKAGE,
41573
+ PAGE_SDK_FILE_TYPED_EXPORTS,
41574
+ PAGE_SDK_EXPORTS,
41575
+ PAGE_SDK_TYPES,
41576
+ AMBIENT_SHIM,
41577
+ SDK_INTERNAL_MODULE,
41578
+ TYPE_CHECK_LIB,
41579
+ TYPE_CHECK_FLAGS,
41580
+ isImplicitAnyDiagnostic,
41581
+ APP_PREFIX,
41582
+ AUTHORING_MODULE,
41583
+ PAGES_SDK_MODULE,
41584
+ pagesSdkMember,
41585
+ pagesSdkObjectText,
41586
+ isAuthoringModule,
41587
+ SOURCE_EXTENSIONS,
41588
+ BINARY_EXTENSIONS,
41589
+ BINARY_FILE_MESSAGE,
41590
+ IMPORT_RULES,
41591
+ importKind,
41592
+ isRelativeSpecifier,
41593
+ unsupportedImportMessage,
41594
+ testSourceImportMessage,
41595
+ resolveLocalSpecifier,
41596
+ resolveLocalSpecifierIn,
41597
+ relativeSpecifier,
41598
+ suggestedRelativeSpecifier,
41599
+ moduleSpecifiers,
41600
+ requestedNames,
40172
41601
  SourceError,
40173
41602
  characterCount,
40174
41603
  diagnosticFromError,
40175
41604
  parseSource,
40176
41605
  defaultExportOf,
41606
+ calleeName,
40177
41607
  expectDefineCall,
41608
+ isFunctionNode,
41609
+ sliceOf,
40178
41610
  childNodes,
40179
- traverse3 as traverse,
41611
+ freeName,
41612
+ bindsName,
41613
+ usesImplicitName,
40180
41614
  GENERATED_RESOURCES_PATH,
41615
+ GENERATED_RESOURCES_MODULE,
41616
+ RESOURCES_EXPORT,
41617
+ resourceMemberName,
41618
+ pathName,
40181
41619
  BUILT_IN_RESOURCES,
41620
+ BUILT_IN_RESOURCE_SLUGS,
41621
+ branchResourceNames,
41622
+ byteOrder,
41623
+ printedKey,
41624
+ quoted,
41625
+ generatedBindingLocal,
41626
+ resourcesImport,
41627
+ resourcesBinding,
41628
+ FieldBuilderValue,
40182
41629
  AssetVersionValue,
41630
+ AssetKeyValue,
40183
41631
  propertyKey,
40184
- staticObject
41632
+ staticValue,
41633
+ isTypeAssertion,
41634
+ staticObject,
41635
+ propertyNode,
41636
+ elementNode,
41637
+ isJson,
41638
+ isPlainObject2 as isPlainObject,
41639
+ requireString,
41640
+ editableProperties
40185
41641
  };