@eide/foir-cli 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/credentials.d.ts +29 -0
- package/dist/auth/credentials.d.ts.map +1 -0
- package/dist/auth/credentials.js +79 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +74 -0
- package/dist/commands/api-keys.d.ts +4 -0
- package/dist/commands/api-keys.d.ts.map +1 -0
- package/dist/commands/api-keys.js +127 -0
- package/dist/commands/context.d.ts +4 -0
- package/dist/commands/context.d.ts.map +1 -0
- package/dist/commands/context.js +92 -0
- package/dist/commands/customers.d.ts +4 -0
- package/dist/commands/customers.d.ts.map +1 -0
- package/dist/commands/customers.js +120 -0
- package/dist/commands/experiments.d.ts +4 -0
- package/dist/commands/experiments.d.ts.map +1 -0
- package/dist/commands/experiments.js +177 -0
- package/dist/commands/extensions.d.ts +4 -0
- package/dist/commands/extensions.d.ts.map +1 -0
- package/dist/commands/extensions.js +94 -0
- package/dist/commands/files.d.ts +4 -0
- package/dist/commands/files.d.ts.map +1 -0
- package/dist/commands/files.js +143 -0
- package/dist/commands/locales.d.ts +4 -0
- package/dist/commands/locales.d.ts.map +1 -0
- package/dist/commands/locales.js +126 -0
- package/dist/commands/login.d.ts +4 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +125 -0
- package/dist/commands/logout.d.ts +4 -0
- package/dist/commands/logout.d.ts.map +1 -0
- package/dist/commands/logout.js +16 -0
- package/dist/commands/media.d.ts +4 -0
- package/dist/commands/media.d.ts.map +1 -0
- package/dist/commands/media.js +44 -0
- package/dist/commands/models.d.ts +4 -0
- package/dist/commands/models.d.ts.map +1 -0
- package/dist/commands/models.js +155 -0
- package/dist/commands/notes.d.ts +4 -0
- package/dist/commands/notes.d.ts.map +1 -0
- package/dist/commands/notes.js +120 -0
- package/dist/commands/notifications.d.ts +4 -0
- package/dist/commands/notifications.d.ts.map +1 -0
- package/dist/commands/notifications.js +73 -0
- package/dist/commands/operations.d.ts +4 -0
- package/dist/commands/operations.d.ts.map +1 -0
- package/dist/commands/operations.js +161 -0
- package/dist/commands/records.d.ts +4 -0
- package/dist/commands/records.d.ts.map +1 -0
- package/dist/commands/records.js +216 -0
- package/dist/commands/schedules.d.ts +4 -0
- package/dist/commands/schedules.d.ts.map +1 -0
- package/dist/commands/schedules.js +150 -0
- package/dist/commands/search.d.ts +4 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +60 -0
- package/dist/commands/segments.d.ts +4 -0
- package/dist/commands/segments.d.ts.map +1 -0
- package/dist/commands/segments.js +143 -0
- package/dist/commands/select-project.d.ts +4 -0
- package/dist/commands/select-project.d.ts.map +1 -0
- package/dist/commands/select-project.js +144 -0
- package/dist/commands/settings.d.ts +4 -0
- package/dist/commands/settings.d.ts.map +1 -0
- package/dist/commands/settings.js +113 -0
- package/dist/commands/variant-catalog.d.ts +4 -0
- package/dist/commands/variant-catalog.d.ts.map +1 -0
- package/dist/commands/variant-catalog.js +111 -0
- package/dist/commands/whoami.d.ts +4 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +50 -0
- package/dist/graphql/queries.d.ts +101 -0
- package/dist/graphql/queries.d.ts.map +1 -0
- package/dist/graphql/queries.js +373 -0
- package/dist/lib/client.d.ts +17 -0
- package/dist/lib/client.d.ts.map +1 -0
- package/dist/lib/client.js +61 -0
- package/dist/lib/config.d.ts +12 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +8 -0
- package/dist/lib/errors.d.ts +6 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/errors.js +62 -0
- package/dist/lib/input.d.ts +36 -0
- package/dist/lib/input.d.ts.map +1 -0
- package/dist/lib/input.js +106 -0
- package/dist/lib/output.d.ts +31 -0
- package/dist/lib/output.d.ts.map +1 -0
- package/dist/lib/output.js +107 -0
- package/package.json +59 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export declare const GET_SESSION_CONTEXT = "\n query { sessionContext { tenantId projectId availableTenants { id name } availableProjects { id name tenantId } } }\n";
|
|
2
|
+
export declare const LIST_API_KEYS = "\n query($includeInactive: Boolean, $search: String, $limit: Int, $offset: Int) {\n listApiKeys(includeInactive: $includeInactive, search: $search, limit: $limit, offset: $offset) {\n apiKeys { id name keyPrefix keyType isActive lastUsedAt usageCount expiresAt scopes createdAt revokedAt rotatedAt }\n total\n }\n }\n";
|
|
3
|
+
export declare const GET_API_KEY = "\n query($id: ID!) { getApiKey(id: $id) { id name keyPrefix keyType isActive lastUsedAt lastUsedIp usageCount expiresAt scopes allowedModels allowedFileTypes metadata createdBy createdAt updatedAt revokedAt rotatedAt } }\n";
|
|
4
|
+
export declare const CREATE_API_KEY = "\n mutation($input: CreateApiKeyInput!) { createApiKey(input: $input) { apiKey { id name keyPrefix isActive scopes createdAt } plainKey warning } }\n";
|
|
5
|
+
export declare const ROTATE_API_KEY = "\n mutation($id: ID!) { rotateApiKey(id: $id) { apiKey { id name keyPrefix rotatedAt } plainKey warning } }\n";
|
|
6
|
+
export declare const REVOKE_API_KEY = "\n mutation($id: ID!) { revokeApiKey(id: $id) { id name isActive revokedAt } }\n";
|
|
7
|
+
export declare const RECORD = "\n query($id: ID!) { record(id: $id) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }\n";
|
|
8
|
+
export declare const RECORD_BY_KEY = "\n query($modelKey: String!, $naturalKey: String!) { recordByKey(modelKey: $modelKey, naturalKey: $naturalKey) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }\n";
|
|
9
|
+
export declare const RECORDS = "\n query($modelKey: String!, $limit: Int, $offset: Int, $filters: [FilterInput!], $sort: SortInput) {\n records(modelKey: $modelKey, limit: $limit, offset: $offset, filters: $filters, sort: $sort) {\n items { id modelKey naturalKey recordType publishStatus versionNumber customerId createdAt updatedAt }\n total\n }\n }\n";
|
|
10
|
+
export declare const CREATE_RECORD = "\n mutation($input: CreateRecordInput!) { createRecord(input: $input) { record { id modelKey naturalKey recordType data metadata createdAt } variant { id variantKey } version { id versionNumber } } }\n";
|
|
11
|
+
export declare const UPDATE_RECORD = "\n mutation($input: UpdateRecordInput!) { updateRecord(input: $input) { record { id modelKey naturalKey data metadata updatedAt } matched } }\n";
|
|
12
|
+
export declare const DELETE_RECORD = "\n mutation($id: ID!) { deleteRecord(id: $id) { id modelKey naturalKey } }\n";
|
|
13
|
+
export declare const PUBLISH_VERSION = "\n mutation($versionId: ID!) { publishVersion(versionId: $versionId) }\n";
|
|
14
|
+
export declare const UNPUBLISH_RECORD = "\n mutation($id: ID!) { unpublishRecord(id: $id) }\n";
|
|
15
|
+
export declare const DUPLICATE_RECORD = "\n mutation($input: DuplicateRecordInput!) { duplicateRecord(input: $input) { record { id modelKey naturalKey } variant { id variantKey } version { id versionNumber } } }\n";
|
|
16
|
+
export declare const RECORD_VERSIONS = "\n query($parentId: ID!, $limit: Int, $offset: Int) { recordVersions(parentId: $parentId, limit: $limit, offset: $offset) { items { id versionNumber publishStatus data contentHash changeDescription createdAt createdBy } } }\n";
|
|
17
|
+
export declare const RECORD_VARIANTS = "\n query($recordId: ID!, $limit: Int, $offset: Int) { recordVariants(recordId: $recordId, limit: $limit, offset: $offset) { items { id variantKey variantName isDefault priority createdAt } } }\n";
|
|
18
|
+
export declare const MODEL_BY_KEY = "\n query($key: String!) { modelByKey(key: $key) { id key name pluralName description category icon fields config hooks displayField extensionId systemEntity deletable editable currentVersionId publishedVersionNumber createdAt updatedAt } }\n";
|
|
19
|
+
export declare const MODELS = "\n query($search: String, $category: String, $limit: Int, $offset: Int) {\n models(search: $search, category: $category, limit: $limit, offset: $offset) {\n items { id key name category config systemEntity createdAt updatedAt }\n total\n }\n }\n";
|
|
20
|
+
export declare const CREATE_MODEL = "\n mutation($input: CreateModelInput!) { createModel(input: $input) { id key name fields config createdAt } }\n";
|
|
21
|
+
export declare const UPDATE_MODEL = "\n mutation($input: UpdateModelInput!) { updateModel(input: $input) { id key name fields config updatedAt } }\n";
|
|
22
|
+
export declare const DELETE_MODEL = "\n mutation($id: ID!) { deleteModel(id: $id) }\n";
|
|
23
|
+
export declare const MODEL_VERSIONS = "\n query($modelId: ID!, $limit: Int, $offset: Int) { modelVersions(modelId: $modelId, limit: $limit, offset: $offset) { items { id modelId versionNumber contentHash changeDescription createdAt createdBy } } }\n";
|
|
24
|
+
export declare const GLOBAL_SEARCH = "\n query($query: String!, $limit: Int, $modelKeys: [String!], $includeMedia: Boolean) {\n globalSearch(query: $query, limit: $limit, modelKeys: $modelKeys, includeMedia: $includeMedia) {\n records { id modelKey title naturalKey subtitle modelName updatedAt }\n media { id fileName altText fileUrl }\n }\n }\n";
|
|
25
|
+
export declare const CUSTOMERS = "\n query($status: CustomerStatus, $search: String, $filters: [FilterInput!], $limit: Int, $offset: Int) {\n customers(status: $status, search: $search, filters: $filters, limit: $limit, offset: $offset) {\n customers { id email status lastLoginAt createdAt updatedAt }\n total\n }\n }\n";
|
|
26
|
+
export declare const CUSTOMER = "\n query($id: ID!) { customer(id: $id) { id email status lastLoginAt createdAt updatedAt } }\n";
|
|
27
|
+
export declare const CUSTOMER_BY_EMAIL = "\n query($email: String!) { customerByEmail(email: $email) { id email status lastLoginAt createdAt updatedAt } }\n";
|
|
28
|
+
export declare const CREATE_CUSTOMER = "\n mutation($input: CreateCustomerInput!) { createCustomer(input: $input) { id email status createdAt } }\n";
|
|
29
|
+
export declare const DELETE_CUSTOMER = "\n mutation($id: ID!) { deleteCustomer(id: $id) { success deletedAt } }\n";
|
|
30
|
+
export declare const SEGMENTS = "\n query($isActive: Boolean, $limit: Int, $offset: Int) { segments(isActive: $isActive, limit: $limit, offset: $offset) { id key name description evaluationMode memberCount isActive createdAt updatedAt } }\n";
|
|
31
|
+
export declare const SEGMENT = "\n query($id: ID!) { segment(id: $id) { id key name description rules evaluationMode manualMemberIds manualMemberMode memberCount memberCountUpdatedAt isActive createdAt updatedAt } }\n";
|
|
32
|
+
export declare const SEGMENT_BY_KEY = "\n query($key: String!) { segmentByKey(key: $key) { id key name description rules evaluationMode manualMemberIds manualMemberMode memberCount memberCountUpdatedAt isActive createdAt updatedAt } }\n";
|
|
33
|
+
export declare const CREATE_SEGMENT = "\n mutation($input: CreateSegmentInput!) { createSegment(input: $input) { id key name isActive createdAt } }\n";
|
|
34
|
+
export declare const UPDATE_SEGMENT = "\n mutation($id: ID!, $input: UpdateSegmentInput!) { updateSegment(id: $id, input: $input) { id key name isActive updatedAt } }\n";
|
|
35
|
+
export declare const DELETE_SEGMENT = "\n mutation($id: ID!) { deleteSegment(id: $id) }\n";
|
|
36
|
+
export declare const PREVIEW_SEGMENT_RULES = "\n query($rules: JSON!, $sampleSize: Int) { previewSegmentRules(rules: $rules, sampleSize: $sampleSize) { estimatedCount sampleCustomerIds sampleSize } }\n";
|
|
37
|
+
export declare const TEST_SEGMENT_EVALUATION = "\n query($segmentId: ID!, $customerId: ID!) { testSegmentEvaluation(segmentId: $segmentId, customerId: $customerId) { matches segmentId customerId } }\n";
|
|
38
|
+
export declare const EXPERIMENTS = "\n query($status: String, $isActive: Boolean, $limit: Int, $offset: Int) { experiments(status: $status, isActive: $isActive, limit: $limit, offset: $offset) { id key name description status controlPercent isActive startDate endDate createdAt updatedAt } }\n";
|
|
39
|
+
export declare const EXPERIMENT = "\n query($id: ID!) { experiment(id: $id) { id key name description status targeting controlPercent variants assignmentPersistence mutuallyExclusive exclusionGroupKey startDate endDate metrics goals { id key name isPrimary } funnel { steps { key name order } } isActive createdAt updatedAt } }\n";
|
|
40
|
+
export declare const EXPERIMENT_BY_KEY = "\n query($key: String!) { experimentByKey(key: $key) { id key name description status targeting controlPercent variants assignmentPersistence mutuallyExclusive exclusionGroupKey startDate endDate metrics goals { id key name isPrimary } funnel { steps { key name order } } isActive createdAt updatedAt } }\n";
|
|
41
|
+
export declare const CREATE_EXPERIMENT = "\n mutation($input: CreateExperimentInput!) { createExperiment(input: $input) { id key name status isActive createdAt } }\n";
|
|
42
|
+
export declare const UPDATE_EXPERIMENT = "\n mutation($id: ID!, $input: UpdateExperimentInput!) { updateExperiment(id: $id, input: $input) { id key name status isActive updatedAt } }\n";
|
|
43
|
+
export declare const DELETE_EXPERIMENT = "\n mutation($id: ID!) { deleteExperiment(id: $id) }\n";
|
|
44
|
+
export declare const START_EXPERIMENT = "\n mutation($experimentId: ID!) { startExperiment(experimentId: $experimentId) { id key name status } }\n";
|
|
45
|
+
export declare const PAUSE_EXPERIMENT = "\n mutation($experimentId: ID!) { pauseExperiment(experimentId: $experimentId) { id key name status } }\n";
|
|
46
|
+
export declare const RESUME_EXPERIMENT = "\n mutation($experimentId: ID!) { resumeExperiment(experimentId: $experimentId) { id key name status } }\n";
|
|
47
|
+
export declare const END_EXPERIMENT = "\n mutation($experimentId: ID!) { endExperiment(experimentId: $experimentId) { id key name status } }\n";
|
|
48
|
+
export declare const EXPERIMENT_STATS = "\n query($experimentId: ID!) { experimentStats(experimentId: $experimentId) { totalAssignments variantAssignments { variantKey variantName count percentage } updatedAt } }\n";
|
|
49
|
+
export declare const ALL_SETTINGS = "\n query { allSettings { id key value category displayName description dataType isPublic isEncrypted createdAt updatedAt } }\n";
|
|
50
|
+
export declare const SETTINGS_BY_CATEGORY = "\n query($category: String!) { settingsByCategory(category: $category) { id key value category displayName description dataType isPublic isEncrypted createdAt updatedAt } }\n";
|
|
51
|
+
export declare const SETTING = "\n query($key: String!) { setting(key: $key) { id key value category displayName description dataType isPublic isEncrypted createdAt updatedAt } }\n";
|
|
52
|
+
export declare const SET_SETTING = "\n mutation($input: SetSettingInput!) { setSetting(input: $input) { id key value category dataType updatedAt } }\n";
|
|
53
|
+
export declare const DELETE_SETTING = "\n mutation($key: String!) { deleteSetting(key: $key) }\n";
|
|
54
|
+
export declare const EXTENSIONS = "\n query($extensionType: String, $enabled: Boolean, $limit: Int, $offset: Int) { extensions(extensionType: $extensionType, enabled: $enabled, limit: $limit, offset: $offset) { id key extensionType direction name description enabled syncStatus createdAt updatedAt } }\n";
|
|
55
|
+
export declare const EXTENSION = "\n query($id: ID!) { extension(id: $id) { id key extensionType direction name description connectionDomain connectionId enabled environment syncStatus syncMetadata features config webhooks createdAt updatedAt } }\n";
|
|
56
|
+
export declare const EXTENSION_BY_KEY = "\n query($key: String!) { extensionByKey(key: $key) { id key extensionType direction name description connectionDomain connectionId enabled environment syncStatus syncMetadata features config webhooks createdAt updatedAt } }\n";
|
|
57
|
+
export declare const REGISTER_EXTENSION = "\n mutation($input: RegisterExtensionInput!) { registerExtension(input: $input) { id key name extensionType enabled createdAt } }\n";
|
|
58
|
+
export declare const TRIGGER_EXTENSION_SYNC = "\n mutation($extensionId: ID!) { triggerExtensionSync(extensionId: $extensionId) { success error results } }\n";
|
|
59
|
+
export declare const OPERATIONS = "\n query($category: String, $isActive: Boolean, $limit: Int, $offset: Int) { operations(category: $category, isActive: $isActive, limit: $limit, offset: $offset) { id key name description category endpoint isActive rateLimitWeight createdAt updatedAt } }\n";
|
|
60
|
+
export declare const OPERATION = "\n query($key: String!) { operation(key: $key) { id key name description icon category endpoint endpointAuth timeoutMs retryPolicy models inputSchema outputSchema ui isActive allowedRoles rateLimitWeight createdAt updatedAt circuitState { endpoint state consecutiveFailures lastFailureTime } } }\n";
|
|
61
|
+
export declare const EXECUTE_OPERATION = "\n mutation($input: ExecuteOperationInput!) { executeOperation(input: $input) { success result error { code message } executionId durationMs metadata } }\n";
|
|
62
|
+
export declare const OPERATION_EXECUTION_STATS = "\n query($operationKey: String!) { operationExecutionStats(operationKey: $operationKey) { totalExecutions successCount failureCount avgDurationMs lastExecutedAt } }\n";
|
|
63
|
+
export declare const DEAD_LETTER_OPERATIONS = "\n query($operationKey: String, $status: DeadLetterStatus, $limit: Int, $offset: Int) {\n deadLetterOperations(operationKey: $operationKey, status: $status, limit: $limit, offset: $offset) {\n items { id operationKey executionId attempts lastError errorCode status failedAt createdAt }\n total\n }\n }\n";
|
|
64
|
+
export declare const RETRY_DEAD_LETTER = "\n mutation($id: ID!) { retryDeadLetterOperation(id: $id) { success result error { code message } executionId durationMs } }\n";
|
|
65
|
+
export declare const DISMISS_DEAD_LETTER = "\n mutation($id: ID!) { dismissDeadLetterOperation(id: $id) { id status dismissedAt } }\n";
|
|
66
|
+
export declare const SCHEDULES = "\n query($isActive: Boolean, $limit: Int, $offset: Int) {\n schedules(isActive: $isActive, limit: $limit, offset: $offset) {\n items { id key name cron cronDescription timezone isActive lastRunAt lastRunStatus nextRunAt runCount failureCount createdAt }\n total\n }\n }\n";
|
|
67
|
+
export declare const SCHEDULE = "\n query($key: String!) { schedule(key: $key) { id key name description cron cronDescription timezone targetType targetConfig isActive pausedAt lastRunAt lastRunStatus lastRunError nextRunAt runCount failureCount consecutiveFailures createdAt updatedAt } }\n";
|
|
68
|
+
export declare const CREATE_SCHEDULE = "\n mutation($input: CreateScheduleInput!) { createSchedule(input: $input) { id key name cron isActive createdAt } }\n";
|
|
69
|
+
export declare const UPDATE_SCHEDULE = "\n mutation($key: String!, $input: UpdateScheduleInput!) { updateSchedule(key: $key, input: $input) { id key name cron isActive updatedAt } }\n";
|
|
70
|
+
export declare const DELETE_SCHEDULE = "\n mutation($key: String!) { deleteSchedule(key: $key) }\n";
|
|
71
|
+
export declare const PAUSE_SCHEDULE = "\n mutation($key: String!) { pauseSchedule(key: $key) { id key isActive pausedAt } }\n";
|
|
72
|
+
export declare const RESUME_SCHEDULE = "\n mutation($key: String!) { resumeSchedule(key: $key) { id key isActive } }\n";
|
|
73
|
+
export declare const TRIGGER_SCHEDULE = "\n mutation($key: String!) { triggerSchedule(key: $key) { success jobId error } }\n";
|
|
74
|
+
export declare const NOTIFICATIONS = "\n query($unreadOnly: Boolean, $limit: Int, $offset: Int) {\n notifications(unreadOnly: $unreadOnly, limit: $limit, offset: $offset) {\n items { id type title message isRead actionUrl createdAt }\n total\n unreadCount\n hasMore\n }\n }\n";
|
|
75
|
+
export declare const MARK_NOTIFICATION_READ = "\n mutation($id: ID!) { markNotificationRead(id: $id) { id isRead readAt } }\n";
|
|
76
|
+
export declare const MARK_ALL_NOTIFICATIONS_READ = "\n mutation { markAllNotificationsRead }\n";
|
|
77
|
+
export declare const LOCALES = "\n query($includeInactive: Boolean, $limit: Int, $offset: Int) { locales(includeInactive: $includeInactive, limit: $limit, offset: $offset) { id code name nativeName isDefault isActive direction fallbackLocaleId createdAt updatedAt } }\n";
|
|
78
|
+
export declare const LOCALE = "\n query($id: ID!) { locale(id: $id) { id code name nativeName isDefault isActive direction fallbackLocaleId createdAt updatedAt } }\n";
|
|
79
|
+
export declare const LOCALE_BY_CODE = "\n query($code: String!) { localeByCode(code: $code) { id code name nativeName isDefault isActive direction fallbackLocaleId createdAt updatedAt } }\n";
|
|
80
|
+
export declare const DEFAULT_LOCALE = "\n query { defaultLocale { id code name nativeName isDefault isActive direction createdAt } }\n";
|
|
81
|
+
export declare const CREATE_LOCALE = "\n mutation($input: CreateLocaleInput!) { createLocale(input: $input) { id code name isDefault isActive createdAt } }\n";
|
|
82
|
+
export declare const UPDATE_LOCALE = "\n mutation($id: ID!, $input: UpdateLocaleInput!) { updateLocale(id: $id, input: $input) { id code name isDefault isActive updatedAt } }\n";
|
|
83
|
+
export declare const DELETE_LOCALE = "\n mutation($id: ID!) { deleteLocale(id: $id) }\n";
|
|
84
|
+
export declare const FILES = "\n query($folder: String, $mimeType: String, $status: FileStatus, $search: String, $limit: Int, $offset: Int) {\n files(folder: $folder, mimeType: $mimeType, status: $status, search: $search, limit: $limit, offset: $offset) {\n items { id filename mimeType size folder fileUrl status tags createdAt updatedAt }\n total\n }\n }\n";
|
|
85
|
+
export declare const FILE = "\n query($id: ID!) { file(id: $id) { id filename mimeType size folder fileUrl storageKey status tags metadata altText caption description createdAt updatedAt } }\n";
|
|
86
|
+
export declare const FILE_STORAGE_USAGE = "\n query { fileStorageUsage { totalFiles totalSize usedStorage storageLimit } }\n";
|
|
87
|
+
export declare const UPDATE_FILE = "\n mutation($id: ID!, $filename: String, $folder: String, $tags: [String!], $status: FileStatus, $metadata: JSON) { updateFile(id: $id, filename: $filename, folder: $folder, tags: $tags, status: $status, metadata: $metadata) { id filename folder tags status updatedAt } }\n";
|
|
88
|
+
export declare const UPDATE_FILE_METADATA = "\n mutation($id: ID!, $altText: String, $caption: String, $description: String) { updateFileMetadata(id: $id, altText: $altText, caption: $caption, description: $description) { id altText caption description updatedAt } }\n";
|
|
89
|
+
export declare const DELETE_FILE = "\n mutation($id: ID!) { deleteFile(id: $id) }\n";
|
|
90
|
+
export declare const NOTES = "\n query($entityType: String!, $entityId: ID!, $includeResolved: Boolean, $limit: Int, $offset: Int) {\n notes(entityType: $entityType, entityId: $entityId, includeResolved: $includeResolved, limit: $limit, offset: $offset) {\n items { id body entityType entityId authorId isResolved resolvedAt resolvedBy parentNoteId createdAt updatedAt }\n total\n }\n }\n";
|
|
91
|
+
export declare const NOTE = "\n query($id: ID!) { note(id: $id) { id body entityType entityId authorId isResolved resolvedAt resolvedBy parentNoteId mentions { id userId status } createdAt updatedAt } }\n";
|
|
92
|
+
export declare const CREATE_NOTE = "\n mutation($input: CreateNoteInput!) { createNote(input: $input) { id body entityType entityId authorId createdAt } }\n";
|
|
93
|
+
export declare const RESOLVE_NOTE = "\n mutation($input: ResolveNoteInput!) { resolveNote(input: $input) { id isResolved resolvedAt resolvedBy } }\n";
|
|
94
|
+
export declare const DELETE_NOTE = "\n mutation($noteId: ID!) { deleteNote(noteId: $noteId) }\n";
|
|
95
|
+
export declare const VARIANT_CATALOG = "\n query($isActive: Boolean, $limit: Int, $offset: Int) { variantCatalog(isActive: $isActive, limit: $limit, offset: $offset) { id key name description dimensions isDefault isActive createdAt updatedAt } }\n";
|
|
96
|
+
export declare const VARIANT_CATALOG_ENTRY = "\n query($id: ID!) { variantCatalogEntry(id: $id) { id key name description dimensions isDefault isActive createdAt updatedAt } }\n";
|
|
97
|
+
export declare const VARIANT_CATALOG_ENTRY_BY_KEY = "\n query($key: String!) { variantCatalogEntryByKey(key: $key) { id key name description dimensions isDefault isActive createdAt updatedAt } }\n";
|
|
98
|
+
export declare const CREATE_VARIANT_CATALOG_ENTRY = "\n mutation($input: CreateVariantCatalogInput!) { createVariantCatalogEntry(input: $input) { id key name isDefault isActive createdAt } }\n";
|
|
99
|
+
export declare const UPDATE_VARIANT_CATALOG_ENTRY = "\n mutation($id: ID!, $input: UpdateVariantCatalogInput!) { updateVariantCatalogEntry(id: $id, input: $input) { id key name isDefault isActive updatedAt } }\n";
|
|
100
|
+
export declare const DELETE_VARIANT_CATALOG_ENTRY = "\n mutation($id: ID!) { deleteVariantCatalogEntry(id: $id) }\n";
|
|
101
|
+
//# sourceMappingURL=queries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/graphql/queries.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
// ============================================================
|
|
2
|
+
// GraphQL Query & Mutation Strings
|
|
3
|
+
// ============================================================
|
|
4
|
+
// Raw template literals — no codegen needed.
|
|
5
|
+
// --- Session / Auth ---
|
|
6
|
+
export const GET_SESSION_CONTEXT = `
|
|
7
|
+
query { sessionContext { tenantId projectId availableTenants { id name } availableProjects { id name tenantId } } }
|
|
8
|
+
`;
|
|
9
|
+
// --- API Keys ---
|
|
10
|
+
export const LIST_API_KEYS = `
|
|
11
|
+
query($includeInactive: Boolean, $search: String, $limit: Int, $offset: Int) {
|
|
12
|
+
listApiKeys(includeInactive: $includeInactive, search: $search, limit: $limit, offset: $offset) {
|
|
13
|
+
apiKeys { id name keyPrefix keyType isActive lastUsedAt usageCount expiresAt scopes createdAt revokedAt rotatedAt }
|
|
14
|
+
total
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
export const GET_API_KEY = `
|
|
19
|
+
query($id: ID!) { getApiKey(id: $id) { id name keyPrefix keyType isActive lastUsedAt lastUsedIp usageCount expiresAt scopes allowedModels allowedFileTypes metadata createdBy createdAt updatedAt revokedAt rotatedAt } }
|
|
20
|
+
`;
|
|
21
|
+
export const CREATE_API_KEY = `
|
|
22
|
+
mutation($input: CreateApiKeyInput!) { createApiKey(input: $input) { apiKey { id name keyPrefix isActive scopes createdAt } plainKey warning } }
|
|
23
|
+
`;
|
|
24
|
+
export const ROTATE_API_KEY = `
|
|
25
|
+
mutation($id: ID!) { rotateApiKey(id: $id) { apiKey { id name keyPrefix rotatedAt } plainKey warning } }
|
|
26
|
+
`;
|
|
27
|
+
export const REVOKE_API_KEY = `
|
|
28
|
+
mutation($id: ID!) { revokeApiKey(id: $id) { id name isActive revokedAt } }
|
|
29
|
+
`;
|
|
30
|
+
// --- Records ---
|
|
31
|
+
export const RECORD = `
|
|
32
|
+
query($id: ID!) { record(id: $id) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }
|
|
33
|
+
`;
|
|
34
|
+
export const RECORD_BY_KEY = `
|
|
35
|
+
query($modelKey: String!, $naturalKey: String!) { recordByKey(modelKey: $modelKey, naturalKey: $naturalKey) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }
|
|
36
|
+
`;
|
|
37
|
+
export const RECORDS = `
|
|
38
|
+
query($modelKey: String!, $limit: Int, $offset: Int, $filters: [FilterInput!], $sort: SortInput) {
|
|
39
|
+
records(modelKey: $modelKey, limit: $limit, offset: $offset, filters: $filters, sort: $sort) {
|
|
40
|
+
items { id modelKey naturalKey recordType publishStatus versionNumber customerId createdAt updatedAt }
|
|
41
|
+
total
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
export const CREATE_RECORD = `
|
|
46
|
+
mutation($input: CreateRecordInput!) { createRecord(input: $input) { record { id modelKey naturalKey recordType data metadata createdAt } variant { id variantKey } version { id versionNumber } } }
|
|
47
|
+
`;
|
|
48
|
+
export const UPDATE_RECORD = `
|
|
49
|
+
mutation($input: UpdateRecordInput!) { updateRecord(input: $input) { record { id modelKey naturalKey data metadata updatedAt } matched } }
|
|
50
|
+
`;
|
|
51
|
+
export const DELETE_RECORD = `
|
|
52
|
+
mutation($id: ID!) { deleteRecord(id: $id) { id modelKey naturalKey } }
|
|
53
|
+
`;
|
|
54
|
+
export const PUBLISH_VERSION = `
|
|
55
|
+
mutation($versionId: ID!) { publishVersion(versionId: $versionId) }
|
|
56
|
+
`;
|
|
57
|
+
export const UNPUBLISH_RECORD = `
|
|
58
|
+
mutation($id: ID!) { unpublishRecord(id: $id) }
|
|
59
|
+
`;
|
|
60
|
+
export const DUPLICATE_RECORD = `
|
|
61
|
+
mutation($input: DuplicateRecordInput!) { duplicateRecord(input: $input) { record { id modelKey naturalKey } variant { id variantKey } version { id versionNumber } } }
|
|
62
|
+
`;
|
|
63
|
+
export const RECORD_VERSIONS = `
|
|
64
|
+
query($parentId: ID!, $limit: Int, $offset: Int) { recordVersions(parentId: $parentId, limit: $limit, offset: $offset) { items { id versionNumber publishStatus data contentHash changeDescription createdAt createdBy } } }
|
|
65
|
+
`;
|
|
66
|
+
export const RECORD_VARIANTS = `
|
|
67
|
+
query($recordId: ID!, $limit: Int, $offset: Int) { recordVariants(recordId: $recordId, limit: $limit, offset: $offset) { items { id variantKey variantName isDefault priority createdAt } } }
|
|
68
|
+
`;
|
|
69
|
+
// --- Models ---
|
|
70
|
+
export const MODEL_BY_KEY = `
|
|
71
|
+
query($key: String!) { modelByKey(key: $key) { id key name pluralName description category icon fields config hooks displayField extensionId systemEntity deletable editable currentVersionId publishedVersionNumber createdAt updatedAt } }
|
|
72
|
+
`;
|
|
73
|
+
export const MODELS = `
|
|
74
|
+
query($search: String, $category: String, $limit: Int, $offset: Int) {
|
|
75
|
+
models(search: $search, category: $category, limit: $limit, offset: $offset) {
|
|
76
|
+
items { id key name category config systemEntity createdAt updatedAt }
|
|
77
|
+
total
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
export const CREATE_MODEL = `
|
|
82
|
+
mutation($input: CreateModelInput!) { createModel(input: $input) { id key name fields config createdAt } }
|
|
83
|
+
`;
|
|
84
|
+
export const UPDATE_MODEL = `
|
|
85
|
+
mutation($input: UpdateModelInput!) { updateModel(input: $input) { id key name fields config updatedAt } }
|
|
86
|
+
`;
|
|
87
|
+
export const DELETE_MODEL = `
|
|
88
|
+
mutation($id: ID!) { deleteModel(id: $id) }
|
|
89
|
+
`;
|
|
90
|
+
export const MODEL_VERSIONS = `
|
|
91
|
+
query($modelId: ID!, $limit: Int, $offset: Int) { modelVersions(modelId: $modelId, limit: $limit, offset: $offset) { items { id modelId versionNumber contentHash changeDescription createdAt createdBy } } }
|
|
92
|
+
`;
|
|
93
|
+
// --- Search ---
|
|
94
|
+
export const GLOBAL_SEARCH = `
|
|
95
|
+
query($query: String!, $limit: Int, $modelKeys: [String!], $includeMedia: Boolean) {
|
|
96
|
+
globalSearch(query: $query, limit: $limit, modelKeys: $modelKeys, includeMedia: $includeMedia) {
|
|
97
|
+
records { id modelKey title naturalKey subtitle modelName updatedAt }
|
|
98
|
+
media { id fileName altText fileUrl }
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
// --- Customers ---
|
|
103
|
+
export const CUSTOMERS = `
|
|
104
|
+
query($status: CustomerStatus, $search: String, $filters: [FilterInput!], $limit: Int, $offset: Int) {
|
|
105
|
+
customers(status: $status, search: $search, filters: $filters, limit: $limit, offset: $offset) {
|
|
106
|
+
customers { id email status lastLoginAt createdAt updatedAt }
|
|
107
|
+
total
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
`;
|
|
111
|
+
export const CUSTOMER = `
|
|
112
|
+
query($id: ID!) { customer(id: $id) { id email status lastLoginAt createdAt updatedAt } }
|
|
113
|
+
`;
|
|
114
|
+
export const CUSTOMER_BY_EMAIL = `
|
|
115
|
+
query($email: String!) { customerByEmail(email: $email) { id email status lastLoginAt createdAt updatedAt } }
|
|
116
|
+
`;
|
|
117
|
+
export const CREATE_CUSTOMER = `
|
|
118
|
+
mutation($input: CreateCustomerInput!) { createCustomer(input: $input) { id email status createdAt } }
|
|
119
|
+
`;
|
|
120
|
+
export const DELETE_CUSTOMER = `
|
|
121
|
+
mutation($id: ID!) { deleteCustomer(id: $id) { success deletedAt } }
|
|
122
|
+
`;
|
|
123
|
+
// --- Segments ---
|
|
124
|
+
export const SEGMENTS = `
|
|
125
|
+
query($isActive: Boolean, $limit: Int, $offset: Int) { segments(isActive: $isActive, limit: $limit, offset: $offset) { id key name description evaluationMode memberCount isActive createdAt updatedAt } }
|
|
126
|
+
`;
|
|
127
|
+
export const SEGMENT = `
|
|
128
|
+
query($id: ID!) { segment(id: $id) { id key name description rules evaluationMode manualMemberIds manualMemberMode memberCount memberCountUpdatedAt isActive createdAt updatedAt } }
|
|
129
|
+
`;
|
|
130
|
+
export const SEGMENT_BY_KEY = `
|
|
131
|
+
query($key: String!) { segmentByKey(key: $key) { id key name description rules evaluationMode manualMemberIds manualMemberMode memberCount memberCountUpdatedAt isActive createdAt updatedAt } }
|
|
132
|
+
`;
|
|
133
|
+
export const CREATE_SEGMENT = `
|
|
134
|
+
mutation($input: CreateSegmentInput!) { createSegment(input: $input) { id key name isActive createdAt } }
|
|
135
|
+
`;
|
|
136
|
+
export const UPDATE_SEGMENT = `
|
|
137
|
+
mutation($id: ID!, $input: UpdateSegmentInput!) { updateSegment(id: $id, input: $input) { id key name isActive updatedAt } }
|
|
138
|
+
`;
|
|
139
|
+
export const DELETE_SEGMENT = `
|
|
140
|
+
mutation($id: ID!) { deleteSegment(id: $id) }
|
|
141
|
+
`;
|
|
142
|
+
export const PREVIEW_SEGMENT_RULES = `
|
|
143
|
+
query($rules: JSON!, $sampleSize: Int) { previewSegmentRules(rules: $rules, sampleSize: $sampleSize) { estimatedCount sampleCustomerIds sampleSize } }
|
|
144
|
+
`;
|
|
145
|
+
export const TEST_SEGMENT_EVALUATION = `
|
|
146
|
+
query($segmentId: ID!, $customerId: ID!) { testSegmentEvaluation(segmentId: $segmentId, customerId: $customerId) { matches segmentId customerId } }
|
|
147
|
+
`;
|
|
148
|
+
// --- Experiments ---
|
|
149
|
+
export const EXPERIMENTS = `
|
|
150
|
+
query($status: String, $isActive: Boolean, $limit: Int, $offset: Int) { experiments(status: $status, isActive: $isActive, limit: $limit, offset: $offset) { id key name description status controlPercent isActive startDate endDate createdAt updatedAt } }
|
|
151
|
+
`;
|
|
152
|
+
export const EXPERIMENT = `
|
|
153
|
+
query($id: ID!) { experiment(id: $id) { id key name description status targeting controlPercent variants assignmentPersistence mutuallyExclusive exclusionGroupKey startDate endDate metrics goals { id key name isPrimary } funnel { steps { key name order } } isActive createdAt updatedAt } }
|
|
154
|
+
`;
|
|
155
|
+
export const EXPERIMENT_BY_KEY = `
|
|
156
|
+
query($key: String!) { experimentByKey(key: $key) { id key name description status targeting controlPercent variants assignmentPersistence mutuallyExclusive exclusionGroupKey startDate endDate metrics goals { id key name isPrimary } funnel { steps { key name order } } isActive createdAt updatedAt } }
|
|
157
|
+
`;
|
|
158
|
+
export const CREATE_EXPERIMENT = `
|
|
159
|
+
mutation($input: CreateExperimentInput!) { createExperiment(input: $input) { id key name status isActive createdAt } }
|
|
160
|
+
`;
|
|
161
|
+
export const UPDATE_EXPERIMENT = `
|
|
162
|
+
mutation($id: ID!, $input: UpdateExperimentInput!) { updateExperiment(id: $id, input: $input) { id key name status isActive updatedAt } }
|
|
163
|
+
`;
|
|
164
|
+
export const DELETE_EXPERIMENT = `
|
|
165
|
+
mutation($id: ID!) { deleteExperiment(id: $id) }
|
|
166
|
+
`;
|
|
167
|
+
export const START_EXPERIMENT = `
|
|
168
|
+
mutation($experimentId: ID!) { startExperiment(experimentId: $experimentId) { id key name status } }
|
|
169
|
+
`;
|
|
170
|
+
export const PAUSE_EXPERIMENT = `
|
|
171
|
+
mutation($experimentId: ID!) { pauseExperiment(experimentId: $experimentId) { id key name status } }
|
|
172
|
+
`;
|
|
173
|
+
export const RESUME_EXPERIMENT = `
|
|
174
|
+
mutation($experimentId: ID!) { resumeExperiment(experimentId: $experimentId) { id key name status } }
|
|
175
|
+
`;
|
|
176
|
+
export const END_EXPERIMENT = `
|
|
177
|
+
mutation($experimentId: ID!) { endExperiment(experimentId: $experimentId) { id key name status } }
|
|
178
|
+
`;
|
|
179
|
+
export const EXPERIMENT_STATS = `
|
|
180
|
+
query($experimentId: ID!) { experimentStats(experimentId: $experimentId) { totalAssignments variantAssignments { variantKey variantName count percentage } updatedAt } }
|
|
181
|
+
`;
|
|
182
|
+
// --- Settings ---
|
|
183
|
+
export const ALL_SETTINGS = `
|
|
184
|
+
query { allSettings { id key value category displayName description dataType isPublic isEncrypted createdAt updatedAt } }
|
|
185
|
+
`;
|
|
186
|
+
export const SETTINGS_BY_CATEGORY = `
|
|
187
|
+
query($category: String!) { settingsByCategory(category: $category) { id key value category displayName description dataType isPublic isEncrypted createdAt updatedAt } }
|
|
188
|
+
`;
|
|
189
|
+
export const SETTING = `
|
|
190
|
+
query($key: String!) { setting(key: $key) { id key value category displayName description dataType isPublic isEncrypted createdAt updatedAt } }
|
|
191
|
+
`;
|
|
192
|
+
export const SET_SETTING = `
|
|
193
|
+
mutation($input: SetSettingInput!) { setSetting(input: $input) { id key value category dataType updatedAt } }
|
|
194
|
+
`;
|
|
195
|
+
export const DELETE_SETTING = `
|
|
196
|
+
mutation($key: String!) { deleteSetting(key: $key) }
|
|
197
|
+
`;
|
|
198
|
+
// --- Extensions ---
|
|
199
|
+
export const EXTENSIONS = `
|
|
200
|
+
query($extensionType: String, $enabled: Boolean, $limit: Int, $offset: Int) { extensions(extensionType: $extensionType, enabled: $enabled, limit: $limit, offset: $offset) { id key extensionType direction name description enabled syncStatus createdAt updatedAt } }
|
|
201
|
+
`;
|
|
202
|
+
export const EXTENSION = `
|
|
203
|
+
query($id: ID!) { extension(id: $id) { id key extensionType direction name description connectionDomain connectionId enabled environment syncStatus syncMetadata features config webhooks createdAt updatedAt } }
|
|
204
|
+
`;
|
|
205
|
+
export const EXTENSION_BY_KEY = `
|
|
206
|
+
query($key: String!) { extensionByKey(key: $key) { id key extensionType direction name description connectionDomain connectionId enabled environment syncStatus syncMetadata features config webhooks createdAt updatedAt } }
|
|
207
|
+
`;
|
|
208
|
+
export const REGISTER_EXTENSION = `
|
|
209
|
+
mutation($input: RegisterExtensionInput!) { registerExtension(input: $input) { id key name extensionType enabled createdAt } }
|
|
210
|
+
`;
|
|
211
|
+
export const TRIGGER_EXTENSION_SYNC = `
|
|
212
|
+
mutation($extensionId: ID!) { triggerExtensionSync(extensionId: $extensionId) { success error results } }
|
|
213
|
+
`;
|
|
214
|
+
// --- Operations ---
|
|
215
|
+
export const OPERATIONS = `
|
|
216
|
+
query($category: String, $isActive: Boolean, $limit: Int, $offset: Int) { operations(category: $category, isActive: $isActive, limit: $limit, offset: $offset) { id key name description category endpoint isActive rateLimitWeight createdAt updatedAt } }
|
|
217
|
+
`;
|
|
218
|
+
export const OPERATION = `
|
|
219
|
+
query($key: String!) { operation(key: $key) { id key name description icon category endpoint endpointAuth timeoutMs retryPolicy models inputSchema outputSchema ui isActive allowedRoles rateLimitWeight createdAt updatedAt circuitState { endpoint state consecutiveFailures lastFailureTime } } }
|
|
220
|
+
`;
|
|
221
|
+
export const EXECUTE_OPERATION = `
|
|
222
|
+
mutation($input: ExecuteOperationInput!) { executeOperation(input: $input) { success result error { code message } executionId durationMs metadata } }
|
|
223
|
+
`;
|
|
224
|
+
export const OPERATION_EXECUTION_STATS = `
|
|
225
|
+
query($operationKey: String!) { operationExecutionStats(operationKey: $operationKey) { totalExecutions successCount failureCount avgDurationMs lastExecutedAt } }
|
|
226
|
+
`;
|
|
227
|
+
export const DEAD_LETTER_OPERATIONS = `
|
|
228
|
+
query($operationKey: String, $status: DeadLetterStatus, $limit: Int, $offset: Int) {
|
|
229
|
+
deadLetterOperations(operationKey: $operationKey, status: $status, limit: $limit, offset: $offset) {
|
|
230
|
+
items { id operationKey executionId attempts lastError errorCode status failedAt createdAt }
|
|
231
|
+
total
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
`;
|
|
235
|
+
export const RETRY_DEAD_LETTER = `
|
|
236
|
+
mutation($id: ID!) { retryDeadLetterOperation(id: $id) { success result error { code message } executionId durationMs } }
|
|
237
|
+
`;
|
|
238
|
+
export const DISMISS_DEAD_LETTER = `
|
|
239
|
+
mutation($id: ID!) { dismissDeadLetterOperation(id: $id) { id status dismissedAt } }
|
|
240
|
+
`;
|
|
241
|
+
// --- Schedules ---
|
|
242
|
+
export const SCHEDULES = `
|
|
243
|
+
query($isActive: Boolean, $limit: Int, $offset: Int) {
|
|
244
|
+
schedules(isActive: $isActive, limit: $limit, offset: $offset) {
|
|
245
|
+
items { id key name cron cronDescription timezone isActive lastRunAt lastRunStatus nextRunAt runCount failureCount createdAt }
|
|
246
|
+
total
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
`;
|
|
250
|
+
export const SCHEDULE = `
|
|
251
|
+
query($key: String!) { schedule(key: $key) { id key name description cron cronDescription timezone targetType targetConfig isActive pausedAt lastRunAt lastRunStatus lastRunError nextRunAt runCount failureCount consecutiveFailures createdAt updatedAt } }
|
|
252
|
+
`;
|
|
253
|
+
export const CREATE_SCHEDULE = `
|
|
254
|
+
mutation($input: CreateScheduleInput!) { createSchedule(input: $input) { id key name cron isActive createdAt } }
|
|
255
|
+
`;
|
|
256
|
+
export const UPDATE_SCHEDULE = `
|
|
257
|
+
mutation($key: String!, $input: UpdateScheduleInput!) { updateSchedule(key: $key, input: $input) { id key name cron isActive updatedAt } }
|
|
258
|
+
`;
|
|
259
|
+
export const DELETE_SCHEDULE = `
|
|
260
|
+
mutation($key: String!) { deleteSchedule(key: $key) }
|
|
261
|
+
`;
|
|
262
|
+
export const PAUSE_SCHEDULE = `
|
|
263
|
+
mutation($key: String!) { pauseSchedule(key: $key) { id key isActive pausedAt } }
|
|
264
|
+
`;
|
|
265
|
+
export const RESUME_SCHEDULE = `
|
|
266
|
+
mutation($key: String!) { resumeSchedule(key: $key) { id key isActive } }
|
|
267
|
+
`;
|
|
268
|
+
export const TRIGGER_SCHEDULE = `
|
|
269
|
+
mutation($key: String!) { triggerSchedule(key: $key) { success jobId error } }
|
|
270
|
+
`;
|
|
271
|
+
// --- Notifications ---
|
|
272
|
+
export const NOTIFICATIONS = `
|
|
273
|
+
query($unreadOnly: Boolean, $limit: Int, $offset: Int) {
|
|
274
|
+
notifications(unreadOnly: $unreadOnly, limit: $limit, offset: $offset) {
|
|
275
|
+
items { id type title message isRead actionUrl createdAt }
|
|
276
|
+
total
|
|
277
|
+
unreadCount
|
|
278
|
+
hasMore
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
`;
|
|
282
|
+
export const MARK_NOTIFICATION_READ = `
|
|
283
|
+
mutation($id: ID!) { markNotificationRead(id: $id) { id isRead readAt } }
|
|
284
|
+
`;
|
|
285
|
+
export const MARK_ALL_NOTIFICATIONS_READ = `
|
|
286
|
+
mutation { markAllNotificationsRead }
|
|
287
|
+
`;
|
|
288
|
+
// --- Locales ---
|
|
289
|
+
export const LOCALES = `
|
|
290
|
+
query($includeInactive: Boolean, $limit: Int, $offset: Int) { locales(includeInactive: $includeInactive, limit: $limit, offset: $offset) { id code name nativeName isDefault isActive direction fallbackLocaleId createdAt updatedAt } }
|
|
291
|
+
`;
|
|
292
|
+
export const LOCALE = `
|
|
293
|
+
query($id: ID!) { locale(id: $id) { id code name nativeName isDefault isActive direction fallbackLocaleId createdAt updatedAt } }
|
|
294
|
+
`;
|
|
295
|
+
export const LOCALE_BY_CODE = `
|
|
296
|
+
query($code: String!) { localeByCode(code: $code) { id code name nativeName isDefault isActive direction fallbackLocaleId createdAt updatedAt } }
|
|
297
|
+
`;
|
|
298
|
+
export const DEFAULT_LOCALE = `
|
|
299
|
+
query { defaultLocale { id code name nativeName isDefault isActive direction createdAt } }
|
|
300
|
+
`;
|
|
301
|
+
export const CREATE_LOCALE = `
|
|
302
|
+
mutation($input: CreateLocaleInput!) { createLocale(input: $input) { id code name isDefault isActive createdAt } }
|
|
303
|
+
`;
|
|
304
|
+
export const UPDATE_LOCALE = `
|
|
305
|
+
mutation($id: ID!, $input: UpdateLocaleInput!) { updateLocale(id: $id, input: $input) { id code name isDefault isActive updatedAt } }
|
|
306
|
+
`;
|
|
307
|
+
export const DELETE_LOCALE = `
|
|
308
|
+
mutation($id: ID!) { deleteLocale(id: $id) }
|
|
309
|
+
`;
|
|
310
|
+
// --- Files (Storage) ---
|
|
311
|
+
export const FILES = `
|
|
312
|
+
query($folder: String, $mimeType: String, $status: FileStatus, $search: String, $limit: Int, $offset: Int) {
|
|
313
|
+
files(folder: $folder, mimeType: $mimeType, status: $status, search: $search, limit: $limit, offset: $offset) {
|
|
314
|
+
items { id filename mimeType size folder fileUrl status tags createdAt updatedAt }
|
|
315
|
+
total
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
`;
|
|
319
|
+
export const FILE = `
|
|
320
|
+
query($id: ID!) { file(id: $id) { id filename mimeType size folder fileUrl storageKey status tags metadata altText caption description createdAt updatedAt } }
|
|
321
|
+
`;
|
|
322
|
+
export const FILE_STORAGE_USAGE = `
|
|
323
|
+
query { fileStorageUsage { totalFiles totalSize usedStorage storageLimit } }
|
|
324
|
+
`;
|
|
325
|
+
export const UPDATE_FILE = `
|
|
326
|
+
mutation($id: ID!, $filename: String, $folder: String, $tags: [String!], $status: FileStatus, $metadata: JSON) { updateFile(id: $id, filename: $filename, folder: $folder, tags: $tags, status: $status, metadata: $metadata) { id filename folder tags status updatedAt } }
|
|
327
|
+
`;
|
|
328
|
+
export const UPDATE_FILE_METADATA = `
|
|
329
|
+
mutation($id: ID!, $altText: String, $caption: String, $description: String) { updateFileMetadata(id: $id, altText: $altText, caption: $caption, description: $description) { id altText caption description updatedAt } }
|
|
330
|
+
`;
|
|
331
|
+
export const DELETE_FILE = `
|
|
332
|
+
mutation($id: ID!) { deleteFile(id: $id) }
|
|
333
|
+
`;
|
|
334
|
+
// --- Notes ---
|
|
335
|
+
export const NOTES = `
|
|
336
|
+
query($entityType: String!, $entityId: ID!, $includeResolved: Boolean, $limit: Int, $offset: Int) {
|
|
337
|
+
notes(entityType: $entityType, entityId: $entityId, includeResolved: $includeResolved, limit: $limit, offset: $offset) {
|
|
338
|
+
items { id body entityType entityId authorId isResolved resolvedAt resolvedBy parentNoteId createdAt updatedAt }
|
|
339
|
+
total
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
`;
|
|
343
|
+
export const NOTE = `
|
|
344
|
+
query($id: ID!) { note(id: $id) { id body entityType entityId authorId isResolved resolvedAt resolvedBy parentNoteId mentions { id userId status } createdAt updatedAt } }
|
|
345
|
+
`;
|
|
346
|
+
export const CREATE_NOTE = `
|
|
347
|
+
mutation($input: CreateNoteInput!) { createNote(input: $input) { id body entityType entityId authorId createdAt } }
|
|
348
|
+
`;
|
|
349
|
+
export const RESOLVE_NOTE = `
|
|
350
|
+
mutation($input: ResolveNoteInput!) { resolveNote(input: $input) { id isResolved resolvedAt resolvedBy } }
|
|
351
|
+
`;
|
|
352
|
+
export const DELETE_NOTE = `
|
|
353
|
+
mutation($noteId: ID!) { deleteNote(noteId: $noteId) }
|
|
354
|
+
`;
|
|
355
|
+
// --- Variant Catalog ---
|
|
356
|
+
export const VARIANT_CATALOG = `
|
|
357
|
+
query($isActive: Boolean, $limit: Int, $offset: Int) { variantCatalog(isActive: $isActive, limit: $limit, offset: $offset) { id key name description dimensions isDefault isActive createdAt updatedAt } }
|
|
358
|
+
`;
|
|
359
|
+
export const VARIANT_CATALOG_ENTRY = `
|
|
360
|
+
query($id: ID!) { variantCatalogEntry(id: $id) { id key name description dimensions isDefault isActive createdAt updatedAt } }
|
|
361
|
+
`;
|
|
362
|
+
export const VARIANT_CATALOG_ENTRY_BY_KEY = `
|
|
363
|
+
query($key: String!) { variantCatalogEntryByKey(key: $key) { id key name description dimensions isDefault isActive createdAt updatedAt } }
|
|
364
|
+
`;
|
|
365
|
+
export const CREATE_VARIANT_CATALOG_ENTRY = `
|
|
366
|
+
mutation($input: CreateVariantCatalogInput!) { createVariantCatalogEntry(input: $input) { id key name isDefault isActive createdAt } }
|
|
367
|
+
`;
|
|
368
|
+
export const UPDATE_VARIANT_CATALOG_ENTRY = `
|
|
369
|
+
mutation($id: ID!, $input: UpdateVariantCatalogInput!) { updateVariantCatalogEntry(id: $id, input: $input) { id key name isDefault isActive updatedAt } }
|
|
370
|
+
`;
|
|
371
|
+
export const DELETE_VARIANT_CATALOG_ENTRY = `
|
|
372
|
+
mutation($id: ID!) { deleteVariantCatalogEntry(id: $id) }
|
|
373
|
+
`;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
import { type GlobalOptions } from './config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Create an authenticated GraphQL client.
|
|
5
|
+
* Auth priority:
|
|
6
|
+
* 1. FOIR_API_KEY env var (CI / headless / LLM mode)
|
|
7
|
+
* 2. Stored credentials from ~/.foir/credentials.json (interactive)
|
|
8
|
+
*/
|
|
9
|
+
export declare function createClient(options?: GlobalOptions): Promise<GraphQLClient>;
|
|
10
|
+
/**
|
|
11
|
+
* Get the API URL + auth headers for REST calls (e.g., file upload).
|
|
12
|
+
*/
|
|
13
|
+
export declare function getRestAuth(options?: GlobalOptions): Promise<{
|
|
14
|
+
apiUrl: string;
|
|
15
|
+
headers: Record<string, string>;
|
|
16
|
+
}>;
|
|
17
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/lib/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAiC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEhF;;;;;GAKG;AACH,wBAAsB,YAAY,CAChC,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,aAAa,CAAC,CAiCxB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAC/B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CA2B9D"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { GraphQLClient } from 'graphql-request';
|
|
2
|
+
import { getCredentials, isTokenExpired } from '../auth/credentials.js';
|
|
3
|
+
import { getApiUrl, getGraphQLEndpoint } from './config.js';
|
|
4
|
+
/**
|
|
5
|
+
* Create an authenticated GraphQL client.
|
|
6
|
+
* Auth priority:
|
|
7
|
+
* 1. FOIR_API_KEY env var (CI / headless / LLM mode)
|
|
8
|
+
* 2. Stored credentials from ~/.foir/credentials.json (interactive)
|
|
9
|
+
*/
|
|
10
|
+
export async function createClient(options) {
|
|
11
|
+
const apiUrl = getApiUrl(options);
|
|
12
|
+
const endpoint = getGraphQLEndpoint(apiUrl);
|
|
13
|
+
const headers = {
|
|
14
|
+
'Content-Type': 'application/json',
|
|
15
|
+
};
|
|
16
|
+
// Path 1: API key from environment
|
|
17
|
+
const envApiKey = process.env.FOIR_API_KEY;
|
|
18
|
+
if (envApiKey) {
|
|
19
|
+
headers['x-api-key'] = envApiKey;
|
|
20
|
+
return new GraphQLClient(endpoint, { headers });
|
|
21
|
+
}
|
|
22
|
+
// Path 2: Stored credentials
|
|
23
|
+
const credentials = await getCredentials();
|
|
24
|
+
if (!credentials) {
|
|
25
|
+
throw new Error('Not authenticated. Run `foir login` or set FOIR_API_KEY.');
|
|
26
|
+
}
|
|
27
|
+
if (isTokenExpired(credentials)) {
|
|
28
|
+
throw new Error('Session expired. Run `foir login` to re-authenticate.');
|
|
29
|
+
}
|
|
30
|
+
headers['Authorization'] = `Bearer ${credentials.accessToken}`;
|
|
31
|
+
if (credentials.selectedProject) {
|
|
32
|
+
headers['x-tenant-id'] = credentials.selectedProject.tenantId;
|
|
33
|
+
headers['x-project-id'] = credentials.selectedProject.id;
|
|
34
|
+
}
|
|
35
|
+
return new GraphQLClient(endpoint, { headers });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Get the API URL + auth headers for REST calls (e.g., file upload).
|
|
39
|
+
*/
|
|
40
|
+
export async function getRestAuth(options) {
|
|
41
|
+
const apiUrl = getApiUrl(options);
|
|
42
|
+
const headers = {};
|
|
43
|
+
const envApiKey = process.env.FOIR_API_KEY;
|
|
44
|
+
if (envApiKey) {
|
|
45
|
+
headers['x-api-key'] = envApiKey;
|
|
46
|
+
return { apiUrl, headers };
|
|
47
|
+
}
|
|
48
|
+
const credentials = await getCredentials();
|
|
49
|
+
if (!credentials) {
|
|
50
|
+
throw new Error('Not authenticated. Run `foir login` or set FOIR_API_KEY.');
|
|
51
|
+
}
|
|
52
|
+
if (isTokenExpired(credentials)) {
|
|
53
|
+
throw new Error('Session expired. Run `foir login` to re-authenticate.');
|
|
54
|
+
}
|
|
55
|
+
headers['Authorization'] = `Bearer ${credentials.accessToken}`;
|
|
56
|
+
if (credentials.selectedProject) {
|
|
57
|
+
headers['x-tenant-id'] = credentials.selectedProject.tenantId;
|
|
58
|
+
headers['x-project-id'] = credentials.selectedProject.id;
|
|
59
|
+
}
|
|
60
|
+
return { apiUrl, headers };
|
|
61
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface GlobalOptions {
|
|
2
|
+
apiUrl?: string;
|
|
3
|
+
json?: boolean;
|
|
4
|
+
jsonl?: boolean;
|
|
5
|
+
quiet?: boolean;
|
|
6
|
+
confirm?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function getApiUrl(options?: {
|
|
9
|
+
apiUrl?: string;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function getGraphQLEndpoint(apiUrl: string): string;
|
|
12
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAE/D;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGzD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const DEFAULT_API_URL = 'https://api.eide.app';
|
|
2
|
+
export function getApiUrl(options) {
|
|
3
|
+
return process.env.FOIR_API_URL ?? options?.apiUrl ?? DEFAULT_API_URL;
|
|
4
|
+
}
|
|
5
|
+
export function getGraphQLEndpoint(apiUrl) {
|
|
6
|
+
const base = apiUrl.replace(/\/$/, '').replace(/\/graphql$/, '');
|
|
7
|
+
return `${base}/graphql`;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { GlobalOptions } from './config.js';
|
|
2
|
+
/**
|
|
3
|
+
* Wrap an async command action with standardized error handling.
|
|
4
|
+
*/
|
|
5
|
+
export declare function withErrorHandler<T extends unknown[]>(optsFn: () => GlobalOptions | undefined, fn: (...args: T) => Promise<void>): (...args: T) => Promise<void>;
|
|
6
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAejD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,OAAO,EAAE,EAClD,MAAM,EAAE,MAAM,aAAa,GAAG,SAAS,EACvC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,GAChC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAoE/B"}
|