powersync 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/README.md +14 -14
  2. package/dist/commands/init.d.ts +0 -1
  3. package/dist/commands/init.js +9 -8
  4. package/dist/commands/instance/sync-rules/generate-schema.js +6 -6
  5. package/dist/constants.d.ts +2 -5
  6. package/dist/constants.js +4 -2
  7. package/dist/service/accounts.client.js +11129 -25
  8. package/dist/service/powersync.client.js +37453 -113
  9. package/dist/service/types.js +1 -1
  10. package/dist/service/utils.js +6 -6
  11. package/dist/utils.js +3 -3
  12. package/oclif.manifest.json +1 -1
  13. package/package.json +28 -20
  14. package/dist/powersync-sdk/accounts/api.d.ts +0 -717
  15. package/dist/powersync-sdk/accounts/api.js +0 -182
  16. package/dist/powersync-sdk/accounts/client.d.ts +0 -1096
  17. package/dist/powersync-sdk/accounts/client.js +0 -124
  18. package/dist/powersync-sdk/accounts/codecs.d.ts +0 -32
  19. package/dist/powersync-sdk/accounts/codecs.js +0 -93
  20. package/dist/powersync-sdk/accounts/index.d.ts +0 -4
  21. package/dist/powersync-sdk/accounts/index.js +0 -4
  22. package/dist/powersync-sdk/accounts/models.d.ts +0 -260
  23. package/dist/powersync-sdk/accounts/models.js +0 -96
  24. package/dist/powersync-sdk/accounts/routes.d.ts +0 -44
  25. package/dist/powersync-sdk/accounts/routes.js +0 -45
  26. package/dist/powersync-sdk/accounts/source.d.ts +0 -76
  27. package/dist/powersync-sdk/accounts/source.js +0 -32
  28. package/dist/powersync-sdk/errors/errors.d.ts +0 -62
  29. package/dist/powersync-sdk/errors/errors.js +0 -115
  30. package/dist/powersync-sdk/errors/index.d.ts +0 -2
  31. package/dist/powersync-sdk/errors/index.js +0 -2
  32. package/dist/powersync-sdk/errors/utils.d.ts +0 -4
  33. package/dist/powersync-sdk/errors/utils.js +0 -18
  34. package/dist/powersync-sdk/fetch-clients/codecs.d.ts +0 -4
  35. package/dist/powersync-sdk/fetch-clients/codecs.js +0 -34
  36. package/dist/powersync-sdk/fetch-clients/decoders.d.ts +0 -3
  37. package/dist/powersync-sdk/fetch-clients/decoders.js +0 -35
  38. package/dist/powersync-sdk/fetch-clients/definitions.d.ts +0 -97
  39. package/dist/powersync-sdk/fetch-clients/definitions.js +0 -22
  40. package/dist/powersync-sdk/fetch-clients/errors.d.ts +0 -7
  41. package/dist/powersync-sdk/fetch-clients/errors.js +0 -19
  42. package/dist/powersync-sdk/fetch-clients/index.d.ts +0 -5
  43. package/dist/powersync-sdk/fetch-clients/index.js +0 -5
  44. package/dist/powersync-sdk/fetch-clients/node-client.d.ts +0 -9
  45. package/dist/powersync-sdk/fetch-clients/node-client.js +0 -107
  46. package/dist/powersync-sdk/fetch-clients/request.d.ts +0 -11
  47. package/dist/powersync-sdk/fetch-clients/request.js +0 -138
  48. package/dist/powersync-sdk/fetch-clients/streaming.d.ts +0 -65
  49. package/dist/powersync-sdk/fetch-clients/streaming.js +0 -99
  50. package/dist/powersync-sdk/fetch-clients/utils.d.ts +0 -13
  51. package/dist/powersync-sdk/fetch-clients/utils.js +0 -43
  52. package/dist/powersync-sdk/fetch-clients/web-client.d.ts +0 -14
  53. package/dist/powersync-sdk/fetch-clients/web-client.js +0 -56
  54. package/dist/powersync-sdk/json/index.d.ts +0 -4
  55. package/dist/powersync-sdk/json/index.js +0 -3
  56. package/dist/powersync-sdk/json/json.d.ts +0 -5
  57. package/dist/powersync-sdk/json/json.js +0 -35
  58. package/dist/powersync-sdk/json/json_container.d.ts +0 -18
  59. package/dist/powersync-sdk/json/json_container.js +0 -28
  60. package/dist/powersync-sdk/json/json_stringify.d.ts +0 -36
  61. package/dist/powersync-sdk/json/json_stringify.js +0 -162
  62. package/dist/powersync-sdk/powersync/client.d.ts +0 -449
  63. package/dist/powersync-sdk/powersync/client.js +0 -53
  64. package/dist/powersync-sdk/powersync/config/HostedConfig.d.ts +0 -327
  65. package/dist/powersync-sdk/powersync/config/HostedConfig.js +0 -92
  66. package/dist/powersync-sdk/powersync/config/PowerSyncConfig.d.ts +0 -211
  67. package/dist/powersync-sdk/powersync/config/PowerSyncConfig.js +0 -97
  68. package/dist/powersync-sdk/powersync/config/normalize.d.ts +0 -32
  69. package/dist/powersync-sdk/powersync/config/normalize.js +0 -85
  70. package/dist/powersync-sdk/powersync/definitions.d.ts +0 -149
  71. package/dist/powersync-sdk/powersync/definitions.js +0 -97
  72. package/dist/powersync-sdk/powersync/index.d.ts +0 -8
  73. package/dist/powersync-sdk/powersync/index.js +0 -8
  74. package/dist/powersync-sdk/powersync/internal_routes.d.ts +0 -247
  75. package/dist/powersync-sdk/powersync/internal_routes.js +0 -69
  76. package/dist/powersync-sdk/powersync/routes.d.ts +0 -779
  77. package/dist/powersync-sdk/powersync/routes.js +0 -191
  78. package/dist/powersync-sdk/sdk-clients/endpoints.d.ts +0 -31
  79. package/dist/powersync-sdk/sdk-clients/endpoints.js +0 -48
  80. package/dist/powersync-sdk/sdk-clients/index.d.ts +0 -3
  81. package/dist/powersync-sdk/sdk-clients/index.js +0 -3
  82. package/dist/powersync-sdk/sdk-clients/pagination.d.ts +0 -14
  83. package/dist/powersync-sdk/sdk-clients/pagination.js +0 -21
  84. package/dist/powersync-sdk/sdk-clients/sdk-client.d.ts +0 -17
  85. package/dist/powersync-sdk/sdk-clients/sdk-client.js +0 -30
  86. package/dist/powersync-sdk/streaming/bson/buffer-array.d.ts +0 -31
  87. package/dist/powersync-sdk/streaming/bson/buffer-array.js +0 -79
  88. package/dist/powersync-sdk/streaming/bson/constants.d.ts +0 -2
  89. package/dist/powersync-sdk/streaming/bson/constants.js +0 -1
  90. package/dist/powersync-sdk/streaming/bson/decoder.d.ts +0 -10
  91. package/dist/powersync-sdk/streaming/bson/decoder.js +0 -62
  92. package/dist/powersync-sdk/streaming/bson/encoder.d.ts +0 -10
  93. package/dist/powersync-sdk/streaming/bson/encoder.js +0 -23
  94. package/dist/powersync-sdk/streaming/bson/header.d.ts +0 -11
  95. package/dist/powersync-sdk/streaming/bson/header.js +0 -52
  96. package/dist/powersync-sdk/streaming/bson/index.d.ts +0 -5
  97. package/dist/powersync-sdk/streaming/bson/index.js +0 -5
  98. package/dist/powersync-sdk/streaming/core/backpressure.d.ts +0 -15
  99. package/dist/powersync-sdk/streaming/core/backpressure.js +0 -34
  100. package/dist/powersync-sdk/streaming/core/cross-stream.d.ts +0 -6
  101. package/dist/powersync-sdk/streaming/core/cross-stream.js +0 -17
  102. package/dist/powersync-sdk/streaming/core/index.d.ts +0 -4
  103. package/dist/powersync-sdk/streaming/core/index.js +0 -4
  104. package/dist/powersync-sdk/streaming/core/node-utils.d.ts +0 -7
  105. package/dist/powersync-sdk/streaming/core/node-utils.js +0 -11
  106. package/dist/powersync-sdk/streaming/core/transformers.d.ts +0 -41
  107. package/dist/powersync-sdk/streaming/core/transformers.js +0 -70
  108. package/dist/powersync-sdk/streaming/core/utils.d.ts +0 -36
  109. package/dist/powersync-sdk/streaming/core/utils.js +0 -66
  110. package/dist/powersync-sdk/streaming/index.d.ts +0 -3
  111. package/dist/powersync-sdk/streaming/index.js +0 -3
  112. package/dist/powersync-sdk/streaming/web.d.ts +0 -4
  113. package/dist/powersync-sdk/streaming/web.js +0 -4
  114. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binaryreader.d.ts +0 -2
  115. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binaryreader.js +0 -36
  116. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binarywriter.d.ts +0 -2
  117. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/binarywriter.js +0 -58
  118. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometry.d.ts +0 -18
  119. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometry.js +0 -348
  120. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometrycollection.d.ts +0 -11
  121. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/geometrycollection.js +0 -118
  122. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/linestring.d.ts +0 -11
  123. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/linestring.js +0 -131
  124. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multilinestring.d.ts +0 -11
  125. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multilinestring.js +0 -134
  126. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipoint.d.ts +0 -11
  127. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipoint.js +0 -122
  128. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipolygon.d.ts +0 -11
  129. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/multipolygon.js +0 -158
  130. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/point.d.ts +0 -14
  131. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/point.js +0 -165
  132. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/polygon.d.ts +0 -11
  133. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/polygon.js +0 -207
  134. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/types.d.ts +0 -30
  135. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/types.js +0 -29
  136. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wktparser.d.ts +0 -2
  137. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wktparser.js +0 -111
  138. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wkx.d.ts +0 -9
  139. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/wkx.js +0 -9
  140. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/zigzag.d.ts +0 -5
  141. package/dist/powersync-sdk/sync-rules/@syncpoint/wkx/zigzag.js +0 -9
  142. package/dist/powersync-sdk/sync-rules/DartSchemaGenerator.d.ts +0 -12
  143. package/dist/powersync-sdk/sync-rules/DartSchemaGenerator.js +0 -35
  144. package/dist/powersync-sdk/sync-rules/ExpressionType.d.ts +0 -33
  145. package/dist/powersync-sdk/sync-rules/ExpressionType.js +0 -62
  146. package/dist/powersync-sdk/sync-rules/IdSequence.d.ts +0 -4
  147. package/dist/powersync-sdk/sync-rules/IdSequence.js +0 -7
  148. package/dist/powersync-sdk/sync-rules/JsSchemaGenerator.d.ts +0 -12
  149. package/dist/powersync-sdk/sync-rules/JsSchemaGenerator.js +0 -38
  150. package/dist/powersync-sdk/sync-rules/SchemaGenerator.d.ts +0 -14
  151. package/dist/powersync-sdk/sync-rules/SchemaGenerator.js +0 -24
  152. package/dist/powersync-sdk/sync-rules/SourceTableInterface.d.ts +0 -5
  153. package/dist/powersync-sdk/sync-rules/SourceTableInterface.js +0 -1
  154. package/dist/powersync-sdk/sync-rules/SqlBucketDescriptor.d.ts +0 -37
  155. package/dist/powersync-sdk/sync-rules/SqlBucketDescriptor.js +0 -116
  156. package/dist/powersync-sdk/sync-rules/SqlDataQuery.d.ts +0 -39
  157. package/dist/powersync-sdk/sync-rules/SqlDataQuery.js +0 -245
  158. package/dist/powersync-sdk/sync-rules/SqlParameterQuery.d.ts +0 -43
  159. package/dist/powersync-sdk/sync-rules/SqlParameterQuery.js +0 -254
  160. package/dist/powersync-sdk/sync-rules/SqlSyncRules.d.ts +0 -52
  161. package/dist/powersync-sdk/sync-rules/SqlSyncRules.js +0 -252
  162. package/dist/powersync-sdk/sync-rules/StaticSchema.d.ts +0 -26
  163. package/dist/powersync-sdk/sync-rules/StaticSchema.js +0 -71
  164. package/dist/powersync-sdk/sync-rules/StaticSqlParameterQuery.d.ts +0 -24
  165. package/dist/powersync-sdk/sync-rules/StaticSqlParameterQuery.js +0 -71
  166. package/dist/powersync-sdk/sync-rules/TablePattern.d.ts +0 -17
  167. package/dist/powersync-sdk/sync-rules/TablePattern.js +0 -56
  168. package/dist/powersync-sdk/sync-rules/TableQuerySchema.d.ts +0 -9
  169. package/dist/powersync-sdk/sync-rules/TableQuerySchema.js +0 -41
  170. package/dist/powersync-sdk/sync-rules/errors.d.ts +0 -22
  171. package/dist/powersync-sdk/sync-rules/errors.js +0 -60
  172. package/dist/powersync-sdk/sync-rules/generators.d.ts +0 -6
  173. package/dist/powersync-sdk/sync-rules/generators.js +0 -6
  174. package/dist/powersync-sdk/sync-rules/index.d.ts +0 -17
  175. package/dist/powersync-sdk/sync-rules/index.js +0 -17
  176. package/dist/powersync-sdk/sync-rules/json_schema.d.ts +0 -3
  177. package/dist/powersync-sdk/sync-rules/json_schema.js +0 -50
  178. package/dist/powersync-sdk/sync-rules/sql_filters.d.ts +0 -91
  179. package/dist/powersync-sdk/sync-rules/sql_filters.js +0 -491
  180. package/dist/powersync-sdk/sync-rules/sql_functions.d.ts +0 -53
  181. package/dist/powersync-sdk/sync-rules/sql_functions.js +0 -755
  182. package/dist/powersync-sdk/sync-rules/sql_support.d.ts +0 -22
  183. package/dist/powersync-sdk/sync-rules/sql_support.js +0 -208
  184. package/dist/powersync-sdk/sync-rules/types.d.ts +0 -174
  185. package/dist/powersync-sdk/sync-rules/types.js +0 -9
  186. package/dist/powersync-sdk/sync-rules/utils.d.ts +0 -45
  187. package/dist/powersync-sdk/sync-rules/utils.js +0 -163
  188. package/dist/service/accounts.client.d.ts +0 -26
  189. package/dist/service/powersync.client.d.ts +0 -269
  190. package/dist/service/types.d.ts +0 -69
  191. package/dist/service/utils.d.ts +0 -5
@@ -1,182 +0,0 @@
1
- /* eslint-disable new-cap */
2
- /* eslint-disable camelcase */
3
- import * as t from 'ts-codec';
4
- import * as codecs from './codecs.js';
5
- import * as models from './models.js';
6
- import * as source from './source.js';
7
- export const IDParam = t.object({
8
- id: t.string
9
- });
10
- export const OperationResponse = t.object({
11
- success: t.boolean
12
- });
13
- export const PaginationParams = t.object({
14
- cursor: t.string.optional(),
15
- limit: t.number.optional()
16
- });
17
- export const SearchParams = PaginationParams.and(t.object({
18
- search: t.string
19
- }));
20
- export const ListResponseMetaData = t.object({
21
- count: t.number,
22
- cursor: t.string,
23
- more: t.boolean,
24
- total: t.number
25
- });
26
- export const DowngradeOrgParams = t.object({
27
- org_id: t.string,
28
- trial_duration: t.number
29
- });
30
- export const UpgradeOrgParams = t.object({
31
- org_id: t.string
32
- });
33
- export const CreateOrgParams = t.object({
34
- name: t.string
35
- });
36
- export const UpdateOrgParams = t.object({
37
- id: t.string,
38
- label: t.string.optional(),
39
- locked: t.boolean.optional()
40
- });
41
- export const UpdateOrgBilling = t.object({
42
- business_customer_code: t.string.optional(),
43
- business_customer_region: t.Enum(models.BUSINESS_REGION).optional(),
44
- id: t.string
45
- });
46
- export const ListOrgParams = PaginationParams.and(codecs.FilterProperties(models.OrganizationResource));
47
- export const ListOrgResponse = ListResponseMetaData.and(t.object({
48
- objects: t.array(models.OrganizationResource)
49
- }));
50
- export const CreateAppParams = t.object({
51
- auth_scope_id: t.string.optional(),
52
- default_region: t.string,
53
- features: t.array(t.Enum(models.ProjectFeatureFlags)).optional(),
54
- name: t.string,
55
- org_id: t.string,
56
- source: source.SourceMetadata,
57
- vcs_mode: t.string
58
- });
59
- export const UpdateAppParams = t.object({
60
- auth_scope_id: t.string.optional(),
61
- id: t.string,
62
- name: t.string.optional(),
63
- source: source.SourceMetadata.optional(),
64
- vcs_mode: t.Enum(models.VCS_MODE).optional()
65
- });
66
- export const ListAppParams = PaginationParams.and(codecs.FilterProperties(codecs.ResourceId.and(t.object({
67
- name: t.string,
68
- org_id: t.string
69
- }))));
70
- export const ListAppsResponse = ListResponseMetaData.and(t.object({
71
- objects: t.array(models.AppResource)
72
- }));
73
- export const GetUserInvitesParams = PaginationParams.and(codecs.FilterProperties(models.DeveloperInviteResource));
74
- export const ListUserInvitesResponse = ListResponseMetaData.and(t.object({
75
- objects: t.array(models.DeveloperInviteResource)
76
- }));
77
- export const ListUserParams = PaginationParams.and(codecs.FilterProperties(models.UserResource));
78
- export const ListUserResponse = ListResponseMetaData.and(t.object({
79
- objects: t.array(models.UserResource)
80
- }));
81
- export const StartTrialParams = t.object({
82
- email: t.string,
83
- features: t.array(t.Enum(models.ProjectFeatureFlags)).optional(),
84
- trial_duration: t.number.optional(),
85
- user_id: t.string.optional()
86
- });
87
- export const CreateDeveloperInviteParams = t.object({
88
- email: t.string,
89
- metadata: t
90
- .object({
91
- role_names: t.array(t.string)
92
- })
93
- .optional(),
94
- org_id: t.string,
95
- requested_role_ids: t.array(t.string)
96
- });
97
- export const GetTrialUserResponse = models.UserResource.and(t.object({
98
- onboarding_token: t.string.optional()
99
- }));
100
- export const UpdateInviteParams = t.object({
101
- id: t.string,
102
- requested_role_ids: t.array(t.string)
103
- });
104
- export const CompleteSignupParams = t.object({
105
- id: t.string,
106
- name: t.string,
107
- password: t.string,
108
- phone_number: t.string.optional()
109
- });
110
- export const TokenResponse = t.object({
111
- token: t.string
112
- });
113
- export const GiveUserAccessParams = t.object({
114
- org_id: t.string,
115
- type: t.Enum(models.UserOrgAccess),
116
- user_id: t.string
117
- });
118
- /**
119
- * Password is required if no MFA is active.
120
- * Factor ID and OTP is required if MFA is enabled for the user.
121
- */
122
- export const GetSensitiveAccessTokenParams = t.object({
123
- factor_id: t.string.optional(),
124
- otp_attempt: t.string.optional(),
125
- password: t.string.optional()
126
- });
127
- export const GetSensitiveAccessTokenResponse = t.object({
128
- token: t.string
129
- });
130
- export const GetPreferredMFAFactorResponse = t.object({
131
- factor: models.UserMFAFactorResource.optional()
132
- });
133
- export const CreateUserParams = t.omit(models.User, ['signup_complete']);
134
- export const ListUserMFAFactorsResponse = t.object({
135
- backup_codes_viewed: t.boolean,
136
- factors: t.array(models.UserMFAFactorResource),
137
- preferred_factor_id: t.string.optional()
138
- });
139
- export const UpdateUserParams = t.object({
140
- id: t.string,
141
- name: t.string.optional()
142
- });
143
- export const RegisterTOTPMFAFactorResponse = t.object({
144
- factor: models.UserMFAFactorResource,
145
- factor_uri: t.string
146
- });
147
- export const RegisterSMSMFAFactorParams = t.object({
148
- consented_at: codecs.date,
149
- mobile_number: t.string
150
- });
151
- export const RegisterSMSMFAFactorResponse = t.object({
152
- factor: models.UserMFAFactorResource,
153
- factor_uri: t.string
154
- });
155
- export const VerifyMFAFactorParams = t.object({
156
- code: t.string,
157
- factor_id: t.string
158
- });
159
- export const VerifyMFAFactorResponse = t.object({
160
- success: t.boolean
161
- });
162
- export const DeleteMFAFactorParams = t.object({
163
- factor_id: t.string
164
- });
165
- export const DeleteMFAFactorResponse = t.object({
166
- success: t.boolean
167
- });
168
- export const GetMFABackupCodesResponse = t.object({
169
- backup_codes: t.array(t.string)
170
- });
171
- export const SetUserMFAPreferenceParams = t.object({
172
- factor_id: t.string
173
- });
174
- export const SetUserMFAPreferenceResponse = t.object({
175
- factor: t.Enum(models.MFAFactor).optional()
176
- });
177
- export const SendMFASMSParams = t.object({
178
- factor_id: t.string
179
- });
180
- export const SendMFASMSResponse = t.object({
181
- sent: t.boolean
182
- });