@wix/auto_sdk_editor-branches_branches 1.0.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.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  11. package/build/cjs/src/editor-branches-v1-branch-branches.context.js +27 -0
  12. package/build/cjs/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  13. package/build/cjs/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  14. package/build/cjs/src/editor-branches-v1-branch-branches.http.js +210 -0
  15. package/build/cjs/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  16. package/build/cjs/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  17. package/build/cjs/src/editor-branches-v1-branch-branches.meta.js +123 -0
  18. package/build/cjs/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  19. package/build/cjs/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  20. package/build/cjs/src/editor-branches-v1-branch-branches.public.js +76 -0
  21. package/build/cjs/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  22. package/build/cjs/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  23. package/build/cjs/src/editor-branches-v1-branch-branches.types.js +46 -0
  24. package/build/cjs/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  25. package/build/cjs/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  26. package/build/cjs/src/editor-branches-v1-branch-branches.universal.js +272 -0
  27. package/build/cjs/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  39. package/build/es/src/editor-branches-v1-branch-branches.context.js +19 -0
  40. package/build/es/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  41. package/build/es/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  42. package/build/es/src/editor-branches-v1-branch-branches.http.js +202 -0
  43. package/build/es/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  44. package/build/es/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  45. package/build/es/src/editor-branches-v1-branch-branches.meta.js +92 -0
  46. package/build/es/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  47. package/build/es/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  48. package/build/es/src/editor-branches-v1-branch-branches.public.js +63 -0
  49. package/build/es/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  50. package/build/es/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  51. package/build/es/src/editor-branches-v1-branch-branches.types.js +43 -0
  52. package/build/es/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  53. package/build/es/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  54. package/build/es/src/editor-branches-v1-branch-branches.universal.js +241 -0
  55. package/build/es/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  66. package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js +27 -0
  67. package/build/internal/cjs/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  68. package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  69. package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js +210 -0
  70. package/build/internal/cjs/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  71. package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  72. package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js +123 -0
  73. package/build/internal/cjs/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  74. package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  75. package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js +76 -0
  76. package/build/internal/cjs/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  77. package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  78. package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.js +46 -0
  79. package/build/internal/cjs/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  80. package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  81. package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.js +272 -0
  82. package/build/internal/cjs/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/editor-branches-v1-branch-branches.context.d.ts +19 -0
  93. package/build/internal/es/src/editor-branches-v1-branch-branches.context.js +19 -0
  94. package/build/internal/es/src/editor-branches-v1-branch-branches.context.js.map +1 -0
  95. package/build/internal/es/src/editor-branches-v1-branch-branches.http.d.ts +18 -0
  96. package/build/internal/es/src/editor-branches-v1-branch-branches.http.js +202 -0
  97. package/build/internal/es/src/editor-branches-v1-branch-branches.http.js.map +1 -0
  98. package/build/internal/es/src/editor-branches-v1-branch-branches.meta.d.ts +23 -0
  99. package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js +92 -0
  100. package/build/internal/es/src/editor-branches-v1-branch-branches.meta.js.map +1 -0
  101. package/build/internal/es/src/editor-branches-v1-branch-branches.public.d.ts +54 -0
  102. package/build/internal/es/src/editor-branches-v1-branch-branches.public.js +63 -0
  103. package/build/internal/es/src/editor-branches-v1-branch-branches.public.js.map +1 -0
  104. package/build/internal/es/src/editor-branches-v1-branch-branches.types.d.ts +468 -0
  105. package/build/internal/es/src/editor-branches-v1-branch-branches.types.js +43 -0
  106. package/build/internal/es/src/editor-branches-v1-branch-branches.types.js.map +1 -0
  107. package/build/internal/es/src/editor-branches-v1-branch-branches.universal.d.ts +752 -0
  108. package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js +241 -0
  109. package/build/internal/es/src/editor-branches-v1-branch-branches.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,92 @@
1
+ import * as ambassadorWixEditorBranchesV1Branch from './editor-branches-v1-branch-branches.http.js';
2
+ export function createBranch() {
3
+ const payload = {};
4
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.createBranch(payload);
5
+ const getUrl = (context) => {
6
+ const { url } = getRequestOptions(context);
7
+ return url;
8
+ };
9
+ return {
10
+ getUrl,
11
+ httpMethod: 'POST',
12
+ path: '/v1/branches',
13
+ pathParams: {},
14
+ __requestType: null,
15
+ __originalRequestType: null,
16
+ __responseType: null,
17
+ __originalResponseType: null,
18
+ };
19
+ }
20
+ export function getBranch() {
21
+ const payload = { branchId: ':branchId' };
22
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.getBranch(payload);
23
+ const getUrl = (context) => {
24
+ const { url } = getRequestOptions(context);
25
+ return url;
26
+ };
27
+ return {
28
+ getUrl,
29
+ httpMethod: 'GET',
30
+ path: '/v1/branches/{branchId}',
31
+ pathParams: { branchId: 'branchId' },
32
+ __requestType: null,
33
+ __originalRequestType: null,
34
+ __responseType: null,
35
+ __originalResponseType: null,
36
+ };
37
+ }
38
+ export function updateBranch() {
39
+ const payload = { branch: { id: ':branchId' } };
40
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.updateBranch(payload);
41
+ const getUrl = (context) => {
42
+ const { url } = getRequestOptions(context);
43
+ return url;
44
+ };
45
+ return {
46
+ getUrl,
47
+ httpMethod: 'PATCH',
48
+ path: '/v1/branches/{branch.id}',
49
+ pathParams: { branchId: 'branchId' },
50
+ __requestType: null,
51
+ __originalRequestType: null,
52
+ __responseType: null,
53
+ __originalResponseType: null,
54
+ };
55
+ }
56
+ export function deleteBranch() {
57
+ const payload = { branchId: ':branchId' };
58
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.deleteBranch(payload);
59
+ const getUrl = (context) => {
60
+ const { url } = getRequestOptions(context);
61
+ return url;
62
+ };
63
+ return {
64
+ getUrl,
65
+ httpMethod: 'DELETE',
66
+ path: '/v1/branches/{branchId}',
67
+ pathParams: { branchId: 'branchId' },
68
+ __requestType: null,
69
+ __originalRequestType: null,
70
+ __responseType: null,
71
+ __originalResponseType: null,
72
+ };
73
+ }
74
+ export function queryBranches() {
75
+ const payload = {};
76
+ const getRequestOptions = ambassadorWixEditorBranchesV1Branch.queryBranches(payload);
77
+ const getUrl = (context) => {
78
+ const { url } = getRequestOptions(context);
79
+ return url;
80
+ };
81
+ return {
82
+ getUrl,
83
+ httpMethod: 'GET',
84
+ path: '/v1/branches/query',
85
+ pathParams: {},
86
+ __requestType: null,
87
+ __originalRequestType: null,
88
+ __responseType: null,
89
+ __originalResponseType: null,
90
+ };
91
+ }
92
+ //# sourceMappingURL=editor-branches-v1-branch-branches.meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-branches-v1-branch-branches.meta.js","sourceRoot":"","sources":["../../../../src/editor-branches-v1-branch-branches.meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,mCAAmC,MAAM,8CAA8C,CAAC;AAsBpG,MAAM,UAAU,YAAY;IAU1B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,mCAAmC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAE5D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,MAAM;QAClB,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS;IAUvB,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAS,CAAC;IAEjD,MAAM,iBAAiB,GACrB,mCAAmC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,yBAAyB;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W;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,aAAa;IAU3B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,mCAAmC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAE7D,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { EventDefinition, HttpClient } from '@wix/sdk-types';
2
+ import { Branch, BranchCreatedEnvelope, BranchDeletedEnvelope, BranchNonNullableFields, BranchUpdatedEnvelope, BranchesQueryBuilder, UpdateBranch } from './editor-branches-v1-branch-branches.universal.js';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function createBranch(httpClient: HttpClient): CreateBranchSignature;
7
+ interface CreateBranchSignature {
8
+ /**
9
+ * Creates a branch.
10
+ * If a source branch is not provided, the branch will include a blank website.
11
+ * @param - Branch to be created.
12
+ * @returns Created branch.
13
+ */
14
+ (branch: Branch): Promise<Branch & BranchNonNullableFields>;
15
+ }
16
+ export declare function getBranch(httpClient: HttpClient): GetBranchSignature;
17
+ interface GetBranchSignature {
18
+ /**
19
+ * Retrieves a branch.
20
+ * @param - ID of branch to retrieve.
21
+ * @returns Requested branch.
22
+ */
23
+ (branchId: string): Promise<Branch & BranchNonNullableFields>;
24
+ }
25
+ export declare function updateBranch(httpClient: HttpClient): UpdateBranchSignature;
26
+ interface UpdateBranchSignature {
27
+ /**
28
+ * Updates a branch.
29
+ *
30
+ * `ORIGINAL_BRANCH` types can't be updated.
31
+ * @param - Branch ID.
32
+ * @returns Updated branch.
33
+ */
34
+ (_id: string | null, branch: UpdateBranch): Promise<Branch & BranchNonNullableFields>;
35
+ }
36
+ export declare function deleteBranch(httpClient: HttpClient): DeleteBranchSignature;
37
+ interface DeleteBranchSignature {
38
+ /**
39
+ * Permanently deletes a branch.
40
+ * @param - ID of branch to delete.
41
+ */
42
+ (branchId: string): Promise<void>;
43
+ }
44
+ export declare function queryBranches(httpClient: HttpClient): QueryBranchesSignature;
45
+ interface QueryBranchesSignature {
46
+ /**
47
+ * Retrieves a list of branches, given the specified [paging, filtering, and sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language).
48
+ */
49
+ (): BranchesQueryBuilder;
50
+ }
51
+ export declare const onBranchCreated: EventDefinition<BranchCreatedEnvelope, "wix.editor.branches.v1.branch_created">;
52
+ export declare const onBranchDeleted: EventDefinition<BranchDeletedEnvelope, "wix.editor.branches.v1.branch_deleted">;
53
+ export declare const onBranchUpdated: EventDefinition<BranchUpdatedEnvelope, "wix.editor.branches.v1.branch_updated">;
54
+ export { ActionEvent, BaseEventMetadata, Branch, BranchCreatedEnvelope, BranchDeletedEnvelope, BranchNonNullableFields, BranchSourceOneOf, BranchUpdatedEnvelope, BranchesQueryBuilder, BranchesQueryResult, CreateBranchRequest, CreateBranchResponse, CreateBranchResponseNonNullableFields, CursorPaging, CursorPagingMetadata, CursorQuery, CursorQueryPagingMethodOneOf, Cursors, DeleteBranchRequest, DeleteBranchResponse, DomainEvent, DomainEventBodyOneOf, EditorType, Empty, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, EventMetadata, ExtendedFields, GetBranchRequest, GetBranchResponse, GetBranchResponseNonNullableFields, HtmlSitePublished, IdentificationData, IdentificationDataIdOneOf, MessageEnvelope, Page, QueryBranchesRequest, QueryBranchesResponse, QueryBranchesResponseNonNullableFields, RestoreInfo, SortOrder, Sorting, SourceBranch, SourceTemplate, SourceType, Type, UpdateBranch, UpdateBranchRequest, UpdateBranchResponse, UpdateBranchResponseNonNullableFields, UpdateExtendedFieldsRequest, UpdateExtendedFieldsResponse, WebhookIdentityType, } from './editor-branches-v1-branch-branches.universal.js';
@@ -0,0 +1,63 @@
1
+ import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';
2
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
3
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
4
+ import { EventDefinition } from '@wix/sdk-types';
5
+ import { createBranch as universalCreateBranch, deleteBranch as universalDeleteBranch, getBranch as universalGetBranch, queryBranches as universalQueryBranches, updateBranch as universalUpdateBranch, } from './editor-branches-v1-branch-branches.universal.js';
6
+ export const __metadata = { PACKAGE_NAME: '@wix/editor-branches' };
7
+ export function createBranch(httpClient) {
8
+ return (branch) => universalCreateBranch(branch,
9
+ // @ts-ignore
10
+ { httpClient });
11
+ }
12
+ export function getBranch(httpClient) {
13
+ return (branchId) => universalGetBranch(branchId,
14
+ // @ts-ignore
15
+ { httpClient });
16
+ }
17
+ export function updateBranch(httpClient) {
18
+ return (_id, branch) => universalUpdateBranch(_id, branch,
19
+ // @ts-ignore
20
+ { httpClient });
21
+ }
22
+ export function deleteBranch(httpClient) {
23
+ return (branchId) => universalDeleteBranch(branchId,
24
+ // @ts-ignore
25
+ { httpClient });
26
+ }
27
+ export function queryBranches(httpClient) {
28
+ return () => universalQueryBranches(
29
+ // @ts-ignore
30
+ { httpClient });
31
+ }
32
+ export const onBranchCreated = EventDefinition('wix.editor.branches.v1.branch_created', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
33
+ {
34
+ transformFn: transformRESTTimestampToSDKTimestamp,
35
+ paths: [
36
+ { path: 'entity.createdDate' },
37
+ { path: 'entity.updatedDate' },
38
+ { path: 'metadata.eventTime' },
39
+ ],
40
+ },
41
+ ])))();
42
+ export const onBranchDeleted = EventDefinition('wix.editor.branches.v1.branch_deleted', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
43
+ {
44
+ transformFn: transformRESTTimestampToSDKTimestamp,
45
+ paths: [
46
+ { path: 'entity.createdDate' },
47
+ { path: 'entity.updatedDate' },
48
+ { path: 'metadata.eventTime' },
49
+ ],
50
+ },
51
+ ])))();
52
+ export const onBranchUpdated = EventDefinition('wix.editor.branches.v1.branch_updated', true, (event) => renameKeysFromRESTResponseToSDKResponse(transformPaths(event, [
53
+ {
54
+ transformFn: transformRESTTimestampToSDKTimestamp,
55
+ paths: [
56
+ { path: 'entity.createdDate' },
57
+ { path: 'entity.updatedDate' },
58
+ { path: 'metadata.eventTime' },
59
+ ],
60
+ },
61
+ ])))();
62
+ export { EditorType, SortOrder, SourceType, Type, WebhookIdentityType, } from './editor-branches-v1-branch-branches.universal.js';
63
+ //# sourceMappingURL=editor-branches-v1-branch-branches.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-branches-v1-branch-branches.public.js","sourceRoot":"","sources":["../../../../src/editor-branches-v1-branch-branches.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EAAE,eAAe,EAAc,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAQL,YAAY,IAAI,qBAAqB,EACrC,YAAY,IAAI,qBAAqB,EACrC,SAAS,IAAI,kBAAkB,EAC/B,aAAa,IAAI,sBAAsB,EACvC,YAAY,IAAI,qBAAqB,GACtC,MAAM,mDAAmD,CAAC;AAE3D,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAA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,EACvC,IAAI,EACJ,CAAC,KAA4B,EAAE,EAAE,CAC/B,uCAAuC,CACrC,cAAc,CAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;SAC/B;KACF;CACF,CAAC,CACH,CACJ,EAAyB,CAAC;AAC3B,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAC5C,uCAAuC,EACvC,IAAI,EACJ,CAAC,KAA4B,EAAE,EAAE,CAC/B,uCAAuC,CACrC,cAAc,CAAC,KAAK,EAAE;IACpB;QACE,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;YAC9B,EAAE,IAAI,EAAE,oBAAoB,EAAE;SAC/B;KACF;CACF,CAAC,CACH,CACJ,EAAyB,CAAC;AAE3B,OAAO,EAuBL,UAAU,EAmBV,SAAS,EAIT,UAAU,EACV,IAAI,EAOJ,mBAAmB,GACpB,MAAM,mDAAmD,CAAC"}
@@ -0,0 +1,468 @@
1
+ /**
2
+ * A branch is a version of draft site content that can be edited independently. Also known as a test site.
3
+ * Read more about branches in this [article](https://support.wix.com/en/article/about-test-sites).
4
+ */
5
+ export interface Branch extends BranchSourceOneOf {
6
+ /** Source branch properties. */
7
+ sourceBranchProperties?: SourceBranch;
8
+ /** Source template properties. */
9
+ sourceTemplateProperties?: SourceTemplate;
10
+ /**
11
+ * Branch ID.
12
+ * @format GUID
13
+ * @readonly
14
+ */
15
+ id?: string | null;
16
+ /**
17
+ * Revision number, which increments by 1 each time the branch is updated.
18
+ * To prevent conflicting changes,
19
+ * the current revision must be passed when updating the branch.
20
+ * @readonly
21
+ */
22
+ revision?: string | null;
23
+ /** Branch type. */
24
+ type?: Type;
25
+ /**
26
+ * Branch name.
27
+ * @maxLength 50
28
+ */
29
+ name?: string | null;
30
+ /** Source type. */
31
+ sourceType?: SourceType;
32
+ /**
33
+ * Date and time the branch was last published, if relevant.
34
+ * @readonly
35
+ */
36
+ lastPublishDate?: string | null;
37
+ /** Editor type. */
38
+ editorType?: EditorType;
39
+ /**
40
+ * Date and time the branch was created.
41
+ * @readonly
42
+ */
43
+ createdDate?: Date | null;
44
+ /**
45
+ * Date and time the branch was last updated.
46
+ * @readonly
47
+ */
48
+ updatedDate?: Date | null;
49
+ /**
50
+ * Custom field data for the branch.
51
+ * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls.
52
+ */
53
+ extendedFields?: ExtendedFields;
54
+ }
55
+ /** @oneof */
56
+ export interface BranchSourceOneOf {
57
+ /** Source branch properties. */
58
+ sourceBranchProperties?: SourceBranch;
59
+ /** Source template properties. */
60
+ sourceTemplateProperties?: SourceTemplate;
61
+ }
62
+ export declare enum Type {
63
+ /** Unknown branch type. */
64
+ UNKNOWN_TYPE = "UNKNOWN_TYPE",
65
+ /** A branch created by a Wix user, that can be accessed for editing and publishing via the editor UI. */
66
+ USER = "USER",
67
+ /** A branch created for technical purposes, unrelated to the Wix user. For internal use, can't be accessed via the editor UI. */
68
+ TECHNICAL = "TECHNICAL",
69
+ /** The original branch of the site, created when the site is created. Can be accessed for editing and publishing in the editor. */
70
+ ORIGINAL_BRANCH = "ORIGINAL_BRANCH"
71
+ }
72
+ export declare enum SourceType {
73
+ /** Unknown source type. */
74
+ UNKNOWN_SOURCE_TYPE = "UNKNOWN_SOURCE_TYPE",
75
+ /** This branch's source was a branch. */
76
+ SOURCE_BRANCH = "SOURCE_BRANCH",
77
+ /** This branch's source was a template. For internal use. */
78
+ SOURCE_TEMPLATE = "SOURCE_TEMPLATE"
79
+ }
80
+ export declare enum EditorType {
81
+ /** Unknown editor type */
82
+ UNKNOWN_EDITOR_TYPE = "UNKNOWN_EDITOR_TYPE",
83
+ /** STUDIO */
84
+ STUDIO = "STUDIO",
85
+ /** CLASSIC */
86
+ CLASSIC = "CLASSIC"
87
+ }
88
+ export interface SourceBranch {
89
+ /**
90
+ * Source branch ID.
91
+ * @format GUID
92
+ */
93
+ branchId?: string;
94
+ /** Source branch revision. */
95
+ branchRevision?: string | null;
96
+ }
97
+ export interface SourceTemplate {
98
+ /**
99
+ * Source template ID.
100
+ * @format GUID
101
+ */
102
+ templateId?: string;
103
+ }
104
+ export interface ExtendedFields {
105
+ /**
106
+ * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
107
+ * The value of each key is structured according to the schema defined when the extended fields were configured.
108
+ *
109
+ * You can only access fields for which you have the appropriate permissions.
110
+ *
111
+ * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
112
+ */
113
+ namespaces?: Record<string, Record<string, any>>;
114
+ }
115
+ export interface CreateBranchRequest {
116
+ /** Branch to be created. */
117
+ branch: Branch;
118
+ }
119
+ export interface CreateBranchResponse {
120
+ /** Created branch. */
121
+ branch?: Branch;
122
+ }
123
+ export interface GetBranchRequest {
124
+ /**
125
+ * ID of branch to retrieve.
126
+ * @format GUID
127
+ */
128
+ branchId: string;
129
+ }
130
+ export interface GetBranchResponse {
131
+ /** Requested branch. */
132
+ branch?: Branch;
133
+ }
134
+ export interface UpdateBranchRequest {
135
+ /** Branch to be updated. */
136
+ branch: Branch;
137
+ }
138
+ export interface UpdateBranchResponse {
139
+ /** Updated branch. */
140
+ branch?: Branch;
141
+ }
142
+ export interface DeleteBranchRequest {
143
+ /**
144
+ * ID of branch to delete.
145
+ * @format GUID
146
+ */
147
+ branchId: string;
148
+ }
149
+ export interface DeleteBranchResponse {
150
+ }
151
+ export interface QueryBranchesRequest {
152
+ /** WQL expression. */
153
+ query?: CursorQuery;
154
+ }
155
+ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
156
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
157
+ cursorPaging?: CursorPaging;
158
+ /**
159
+ * Filter object in the following format: `"filter" : { "fieldName1": "value1", "fieldName2":{"$operator":"value2"}}`.
160
+ *
161
+ * Filterable fields:
162
+ *
163
+ * `type`
164
+ * `name`
165
+ * `updatedDate`
166
+ * `createdDate`
167
+ * `lastPublishDate`
168
+ * `sourceBranchProperties.branchId`
169
+ * `sourceBranchProperties.branchRevision`
170
+ *
171
+ * All operators are valid.
172
+ */
173
+ filter?: Record<string, any> | null;
174
+ /**
175
+ * Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`.
176
+ *
177
+ * Sortable fields:
178
+ *
179
+ * `updatedDate`
180
+ * `createdDate`
181
+ * `lastPublishDate`
182
+ * @maxSize 5
183
+ */
184
+ sort?: Sorting[];
185
+ }
186
+ /** @oneof */
187
+ export interface CursorQueryPagingMethodOneOf {
188
+ /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
189
+ cursorPaging?: CursorPaging;
190
+ }
191
+ export interface Sorting {
192
+ /**
193
+ * Name of the field to sort by.
194
+ * @maxLength 512
195
+ */
196
+ fieldName?: string;
197
+ /** Sort order. */
198
+ order?: SortOrder;
199
+ }
200
+ export declare enum SortOrder {
201
+ ASC = "ASC",
202
+ DESC = "DESC"
203
+ }
204
+ export interface CursorPaging {
205
+ /**
206
+ * Maximum number of items to return in the results.
207
+ * @max 100
208
+ */
209
+ limit?: number | null;
210
+ /**
211
+ * Pointer to the next or previous page in the list of results.
212
+ *
213
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
214
+ * Not relevant for the first request.
215
+ * @maxLength 16000
216
+ */
217
+ cursor?: string | null;
218
+ }
219
+ export interface QueryBranchesResponse {
220
+ /** List of branches. */
221
+ branches?: Branch[];
222
+ /** Paging metadata */
223
+ pagingMetadata?: CursorPagingMetadata;
224
+ }
225
+ export interface CursorPagingMetadata {
226
+ /** Number of items returned in the response. */
227
+ count?: number | null;
228
+ /** Cursor strings that point to the next page, previous page, or both. */
229
+ cursors?: Cursors;
230
+ /**
231
+ * Whether there are more pages to retrieve following the current page.
232
+ *
233
+ * + `true`: Another page of results can be retrieved.
234
+ * + `false`: This is the last page.
235
+ */
236
+ hasNext?: boolean | null;
237
+ }
238
+ export interface Cursors {
239
+ /**
240
+ * Cursor string pointing to the next page in the list of results.
241
+ * @maxLength 16000
242
+ */
243
+ next?: string | null;
244
+ /**
245
+ * Cursor pointing to the previous page in the list of results.
246
+ * @maxLength 16000
247
+ */
248
+ prev?: string | null;
249
+ }
250
+ export interface UpdateExtendedFieldsRequest {
251
+ /** ID of the entity to update. */
252
+ id?: string;
253
+ /** Identifier for the app whose extended fields are being updated. */
254
+ namespace?: string;
255
+ /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */
256
+ namespaceData?: Record<string, any> | null;
257
+ }
258
+ export interface UpdateExtendedFieldsResponse {
259
+ /** Updated branch. */
260
+ branch?: Branch;
261
+ }
262
+ export interface HtmlSitePublished {
263
+ /**
264
+ * Application instance ID
265
+ * @maxLength 50
266
+ */
267
+ appInstanceId?: string;
268
+ /**
269
+ * Application type
270
+ * @maxLength 100
271
+ */
272
+ appType?: string;
273
+ /** Revision */
274
+ revision?: string;
275
+ /**
276
+ * MSID
277
+ * @maxLength 100
278
+ */
279
+ metaSiteId?: string | null;
280
+ /**
281
+ * optional branch id if publish is done from branch
282
+ * @format GUID
283
+ */
284
+ branchId?: string | null;
285
+ /** The site's last transactionId */
286
+ lastTransactionId?: string | null;
287
+ /** A list of the site's pages */
288
+ pages?: Page[];
289
+ /** Site's publish date */
290
+ publishDate?: string;
291
+ }
292
+ export interface Page {
293
+ /**
294
+ * Page's Id
295
+ * @maxLength 100
296
+ */
297
+ id?: string;
298
+ }
299
+ export interface Empty {
300
+ }
301
+ export interface DomainEvent extends DomainEventBodyOneOf {
302
+ createdEvent?: EntityCreatedEvent;
303
+ updatedEvent?: EntityUpdatedEvent;
304
+ deletedEvent?: EntityDeletedEvent;
305
+ actionEvent?: ActionEvent;
306
+ /**
307
+ * Unique event ID.
308
+ * Allows clients to ignore duplicate webhooks.
309
+ */
310
+ id?: string;
311
+ /**
312
+ * Assumes actions are also always typed to an entity_type
313
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
314
+ */
315
+ entityFqdn?: string;
316
+ /**
317
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
318
+ * This is although the created/updated/deleted notion is duplication of the oneof types
319
+ * Example: created/updated/deleted/started/completed/email_opened
320
+ */
321
+ slug?: string;
322
+ /** ID of the entity associated with the event. */
323
+ entityId?: string;
324
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
325
+ eventTime?: Date | null;
326
+ /**
327
+ * Whether the event was triggered as a result of a privacy regulation application
328
+ * (for example, GDPR).
329
+ */
330
+ triggeredByAnonymizeRequest?: boolean | null;
331
+ /** If present, indicates the action that triggered the event. */
332
+ originatedFrom?: string | null;
333
+ /**
334
+ * A sequence number defining the order of updates to the underlying entity.
335
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
336
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
337
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
338
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
339
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
340
+ */
341
+ entityEventSequence?: string | null;
342
+ }
343
+ /** @oneof */
344
+ export interface DomainEventBodyOneOf {
345
+ createdEvent?: EntityCreatedEvent;
346
+ updatedEvent?: EntityUpdatedEvent;
347
+ deletedEvent?: EntityDeletedEvent;
348
+ actionEvent?: ActionEvent;
349
+ }
350
+ export interface EntityCreatedEvent {
351
+ entityAsJson?: string;
352
+ /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */
353
+ restoreInfo?: RestoreInfo;
354
+ }
355
+ export interface RestoreInfo {
356
+ deletedDate?: Date | null;
357
+ }
358
+ export interface EntityUpdatedEvent {
359
+ /**
360
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
361
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
362
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
363
+ */
364
+ currentEntityAsJson?: string;
365
+ }
366
+ export interface EntityDeletedEvent {
367
+ /** Entity that was deleted */
368
+ deletedEntityAsJson?: string | null;
369
+ }
370
+ export interface ActionEvent {
371
+ bodyAsJson?: string;
372
+ }
373
+ export interface MessageEnvelope {
374
+ /**
375
+ * App instance ID.
376
+ * @format GUID
377
+ */
378
+ instanceId?: string | null;
379
+ /**
380
+ * Event type.
381
+ * @maxLength 150
382
+ */
383
+ eventType?: string;
384
+ /** The identification type and identity data. */
385
+ identity?: IdentificationData;
386
+ /** Stringify payload. */
387
+ data?: string;
388
+ }
389
+ export interface IdentificationData extends IdentificationDataIdOneOf {
390
+ /**
391
+ * ID of a site visitor that has not logged in to the site.
392
+ * @format GUID
393
+ */
394
+ anonymousVisitorId?: string;
395
+ /**
396
+ * ID of a site visitor that has logged in to the site.
397
+ * @format GUID
398
+ */
399
+ memberId?: string;
400
+ /**
401
+ * ID of a Wix user (site owner, contributor, etc.).
402
+ * @format GUID
403
+ */
404
+ wixUserId?: string;
405
+ /**
406
+ * ID of an app.
407
+ * @format GUID
408
+ */
409
+ appId?: string;
410
+ /** @readonly */
411
+ identityType?: WebhookIdentityType;
412
+ }
413
+ /** @oneof */
414
+ export interface IdentificationDataIdOneOf {
415
+ /**
416
+ * ID of a site visitor that has not logged in to the site.
417
+ * @format GUID
418
+ */
419
+ anonymousVisitorId?: string;
420
+ /**
421
+ * ID of a site visitor that has logged in to the site.
422
+ * @format GUID
423
+ */
424
+ memberId?: string;
425
+ /**
426
+ * ID of a Wix user (site owner, contributor, etc.).
427
+ * @format GUID
428
+ */
429
+ wixUserId?: string;
430
+ /**
431
+ * ID of an app.
432
+ * @format GUID
433
+ */
434
+ appId?: string;
435
+ }
436
+ export declare enum WebhookIdentityType {
437
+ UNKNOWN = "UNKNOWN",
438
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
439
+ MEMBER = "MEMBER",
440
+ WIX_USER = "WIX_USER",
441
+ APP = "APP"
442
+ }
443
+ interface SourceBranchNonNullableFields {
444
+ branchId: string;
445
+ }
446
+ interface SourceTemplateNonNullableFields {
447
+ templateId: string;
448
+ }
449
+ interface BranchNonNullableFields {
450
+ sourceBranchProperties?: SourceBranchNonNullableFields;
451
+ sourceTemplateProperties?: SourceTemplateNonNullableFields;
452
+ type: Type;
453
+ sourceType: SourceType;
454
+ editorType: EditorType;
455
+ }
456
+ export interface CreateBranchResponseNonNullableFields {
457
+ branch?: BranchNonNullableFields;
458
+ }
459
+ export interface GetBranchResponseNonNullableFields {
460
+ branch?: BranchNonNullableFields;
461
+ }
462
+ export interface UpdateBranchResponseNonNullableFields {
463
+ branch?: BranchNonNullableFields;
464
+ }
465
+ export interface QueryBranchesResponseNonNullableFields {
466
+ branches: BranchNonNullableFields[];
467
+ }
468
+ export {};